protected function LoginSecuritySoftBlockTest::assertNoSoftBlocked in Login Security 2.x
Checks whether the request is not Soft Blocked.
1 call to LoginSecuritySoftBlockTest::assertNoSoftBlocked()
- LoginSecuritySoftBlockTest::testSoftBlocking in tests/
src/ Functional/ LoginSecuritySoftBlockTest.php - Test soft blocking.
File
- tests/
src/ Functional/ LoginSecuritySoftBlockTest.php, line 25
Class
- LoginSecuritySoftBlockTest
- Test Login Security's soft blocking restrictions.
Namespace
Drupal\Tests\login_security\FunctionalCode
protected function assertNoSoftBlocked($account) {
$this
->drupalLoginLite($account);
$this
->assertNoText('This host is not allowed to log in', 'Soft-blocked notice does not display.');
$this
->assertNoText(new FormattableMarkup('The user @user_name has been blocked due to failed login attempts.', [
'@user_name' => $account
->getAccountName(),
]), 'User is not blocked.');
$this
->assertFieldByName('form_id', 'user_login_form', 'Login form found.');
}