protected function DateUpdatesTestCase::loginUser1 in Date 7.3
Log in as user 1.
The benefit of doing this is that it ignores permissions entirely, so the raw functionality can be tested.
1 call to DateUpdatesTestCase::loginUser1()
- DateUpdatesTestCase::setUp in tests/DateUpdatesTestCase.test 
- Sets up a Drupal site for running functional and integration tests.
File
- tests/DateUpdatesTestCase.test, line 47 
- Test updates for the Date module.
Class
- DateUpdatesTestCase
- Test updates for the Date module.
Code
protected function loginUser1() {
  // Load user 1.
  $account = user_load(1, TRUE);
  // Reset the password.
  $password = user_password();
  $edit = array(
    'pass' => $password,
  );
  user_save($account, $edit);
  $account->pass_raw = $password;
  // Login.
  $this
    ->drupalLogin($account);
}