only in patch2: unchanged: --- a/core/modules/user/src/Tests/UserPasswordResetTest.php +++ b/core/modules/user/src/Tests/UserPasswordResetTest.php @@ -38,21 +38,16 @@ protected function setUp() { $this->drupalPlaceBlock('system_menu_block:account'); // Create a user. - $account = $this->drupalCreateUser(); + $this->account = $this->drupalCreateUser(); // Activate user by logging in. - $this->drupalLogin($account); - - $this->account = user_load($account->id()); + $this->drupalLogin($this->account); $this->drupalLogout(); // Set the last login time that is used to generate the one-time link so // that it is definitely over a second ago. - $account->login = REQUEST_TIME - mt_rand(10, 100000); - db_update('users_field_data') - ->fields(array('login' => $account->getLastLoginTime())) - ->condition('uid', $account->id()) - ->execute(); + $this->account->setLastLoginTime(REQUEST_TIME - mt_rand(10, 100000)); + $this->account->save(); } /**