protected function LoginSecurityTestBase::drupalLoginLite in Login Security 8
Alternative to drupalLogin().
5 calls to LoginSecurityTestBase::drupalLoginLite()
- LoginSecurityEmailTest::setUp in src/
Tests/ LoginSecurityEmailTest.php - Sets up a Drupal site for running functional and integration tests.
- LoginSecuritySoftBlockTest::assertNoSoftBlocked in src/
Tests/ LoginSecuritySoftBlockTest.php - Checks whether the request is not Soft Blocked.
- LoginSecuritySoftBlockTest::assertSoftBlocked in src/
Tests/ LoginSecuritySoftBlockTest.php - Checks whether the request is Soft Blocked.
- LoginSecurityUserBlockingTest::testDrupalErrorToggle in src/
Tests/ LoginSecurityUserBlockingTest.php - Test disable core login error toggle.
- LoginSecurityUserBlockingTest::testUserBlocking in src/
Tests/ LoginSecurityUserBlockingTest.php - Test user blocking.
File
- src/
Tests/ LoginSecurityTestBase.php, line 60
Class
- LoginSecurityTestBase
- Helper test class with some added functions for testing.
Namespace
Drupal\login_security\TestsCode
protected function drupalLoginLite($user) {
if ($this
->drupalUserIsLoggedIn($user)) {
$this
->drupalLogout();
}
$edit = [
'name' => $user
->getAccountName(),
'pass' => $user
->getPassword(),
];
$this
->drupalPostForm('user', $edit, t('Log in'));
$this
->assertResponse(200, t('Login page reloaded.'));
$this->loggedInUser = TRUE;
}