// Ensure another email was sent.
$this->
assertCount($before + 4,
$this->
drupalGetMails(['id' => 'user_password_reset'
]), 'Another email was sent after clearing flood control.'
);
} /**
* Helper function to make assertions about a valid password reset.
*
* @internal
*/
public function assertValidPasswordReset(string
$name): void
{ $this->
assertSession()->
pageTextContains("If
$name is a valid account, an email will be sent with instructions to reset your password."
);
$this->
assertMail('to',
$this->account->
getEmail(), 'Password e-mail sent to user.'
);
$subject = 'Replacement login information for ' .
$this->account->
getAccountName() . ' at Drupal';
$this->
assertMail('subject',
$subject, 'Password reset e-mail subject is correct.'
);
} /**
* Helper function to make assertions about an invalid password reset.
*
* @param string $name
* The user name.
*
* @internal
*/