public function LoginSecurityUserBlockingTest::drupalLoginLite in Login Security 7
Same name and namespace in other branches
- 6 login_security.test \LoginSecurityUserBlockingTest::drupalLoginLite()
Alternative to drupalLogin().
drupalLogin() has assertions that we know will fail.
2 calls to LoginSecurityUserBlockingTest::drupalLoginLite()
- LoginSecurityUserBlockingTest::testDrupalErrorToggle in ./
login_security.test - Test disable core login error toggle.
- LoginSecurityUserBlockingTest::testUserBlocking in ./
login_security.test - Test user blocking.
File
- ./
login_security.test, line 208 - Test the basic functions of the Login Security module.
Class
- LoginSecurityUserBlockingTest
- Test login_security user blocking.
Code
public function drupalLoginLite(stdClass $user) {
if ($this->loggedInUser) {
$this
->drupalLogout();
}
$edit = array(
'name' => $user->name,
'pass' => $user->pass_raw,
);
$this
->drupalPost('user', $edit, t('Log in'));
$this
->assertResponse(200, t('Login page reloaded.'));
$this->loggedInUser = TRUE;
}