protected function ScannerHelperTrait::loginUser1 in Search and Replace Scanner 8
Log in as user 1.
File
- tests/
src/ Functional/ ScannerHelperTrait.php, line 19
Class
- ScannerHelperTrait
- Misc helper functions for the automated tests.
Namespace
Drupal\Tests\scanner\FunctionalCode
protected function loginUser1() {
// Load user 1.
/* @var \Drupal\user\Entity\User $account */
$account = User::load(1);
// Reset the password.
$password = 'foo';
$account
->setPassword($password)
->save();
// Support old and new tests.
$account->passRaw = $password;
$account->pass_raw = $password;
// Login.
$this
->drupalLogin($account);
}