You are here

protected function ViewsTestCase::loginUser1 in Views (for Drupal 7) 7.3

Log in as user 1.

File

tests/views_query.test, line 141
Abstract class for views testing.

Class

ViewsTestCase

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