You are here

function LoginSecurityUserBlockingTest::drupalLoginLite in Login Security 6

Same name and namespace in other branches
  1. 7 login_security.test \LoginSecurityUserBlockingTest::drupalLoginLite()
2 calls to LoginSecurityUserBlockingTest::drupalLoginLite()
LoginSecurityUserBlockingTest::testDrupalErrorToggle in ./login_security.test
LoginSecurityUserBlockingTest::testUserBlocking in ./login_security.test

File

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

Class

LoginSecurityUserBlockingTest

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