You are here

protected function ExifCustomHelper::loginUser1 in EXIF Custom 7

Log in as user 1.

1 call to ExifCustomHelper::loginUser1()
ExifCustomHelper::setUp in tests/ExifCustomHelper.test
Sets up a Drupal site for running functional and integration tests.

File

tests/ExifCustomHelper.test, line 45
Base test logic for the EXIF Custom module.

Class

ExifCustomHelper
Base test logic for the EXIF Custom module.

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