1 user_password_reset.test | public UserPasswordResetTest::testResetInvalidation() |
Make sure that password reset URLs are invalidated when the user's email address changes.
File
- core/
modules/ user/ tests/ user_password_reset.test, line 326 - Tests for resetting the password.
Class
Code
public function testResetInvalidation() {
$account = $this->backdropCreateUser();
$original_reset_url = user_pass_reset_url($account);
$account->mail = '1' . $account->mail;
$account->save();
$this->backdropGet($original_reset_url);
$this->assertText('You have tried to use a reset password link that has either been used or is no longer valid. Please request a new one using the form below.');
}