You are here

protected function ScannerBaseTestCase::loginUser1 in Search and Replace Scanner 7

Log in as user 1.

2 calls to ScannerBaseTestCase::loginUser1()
ScannerBasicsTestCase::setUp in tests/ScannerBasicsTestCase.test
Sets up a Drupal site for running functional and integration tests.
ScannerUiTestCase::testTheSiteStillWorks in tests/ScannerUiTestCase.test
Make sure the site still works. For now just check the front page.

File

tests/ScannerBaseTestCase.test, line 66
Base test class to make other tests simpler.

Class

ScannerBaseTestCase
Base test class to make other tests simpler.

Code

protected function loginUser1() {
  $password = user_password();

  // Reset the user 1 password.
  $account = user_load(1);
  $edit = array(
    'pass' => $password,
  );
  $account = user_save($account, $edit);
  $account->pass_raw = $password;

  // Log in as user 1.
  $this
    ->drupalLogin($account);
}