You are here

protected function AdminViewsWebTestCase::loginUser1 in Administration Views 7

Log in as user 1.

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

File

tests/admin_views.test, line 62
Tests for the Administration Views module.

Class

AdminViewsWebTestCase
Base class for all Administration Views web test cases.

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