You are here

public function LoginSecuritySoftBlockTest::drupalLoginLite in Login Security 7

Same name and namespace in other branches
  1. 6 login_security.test \LoginSecuritySoftBlockTest::drupalLoginLite()

Alternative to drupalLogin().

drupalLogin() has assertions that we know will fail.

1 call to LoginSecuritySoftBlockTest::drupalLoginLite()
LoginSecuritySoftBlockTest::testSoftBlocking in ./login_security.test
Test soft blocking.

File

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

Class

LoginSecuritySoftBlockTest
Test login_security soft blocks.

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