protected function LoginSecuritySoftBlockTest::assertNoSoftBlocked in Login Security 8
Checks whether the request is not Soft Blocked.
1 call to LoginSecuritySoftBlockTest::assertNoSoftBlocked()
- LoginSecuritySoftBlockTest::testSoftBlocking in src/
Tests/ LoginSecuritySoftBlockTest.php - Test soft blocking.
File
- src/
Tests/ LoginSecuritySoftBlockTest.php, line 21
Class
- LoginSecuritySoftBlockTest
- Test Login Security's soft blocking restrictions.
Namespace
Drupal\login_security\TestsCode
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(SafeMarkup::format('The user @user_name has been blocked due to failed login attempts.', [
'@user_name' => $account
->getUsername(),
]), 'User is not blocked.');
$this
->assertFieldByName('form_id', 'user_login_form', 'Login form found.');
}