You are here

function LoginSecuritySoftBlockTest::drupalLoginLite in Login Security 6

Same name and namespace in other branches
  1. 7 login_security.test \LoginSecuritySoftBlockTest::drupalLoginLite()
1 call to LoginSecuritySoftBlockTest::drupalLoginLite()
LoginSecuritySoftBlockTest::testSoftBlocking in ./login_security.test

File

./login_security.test, line 257
Test the basic functions of the Login Security module.

Class

LoginSecuritySoftBlockTest

Code

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;
}