Skip to content
Snippets Groups Projects
Commit 53a0da8d authored by andrew farquharson's avatar andrew farquharson
Browse files

add assertion to UserPasswordResetTest

parent be6d2e80
No related branches found
No related tags found
1 merge request!10611Keep user emails plain text
......@@ -168,6 +168,9 @@ public function testUserPasswordReset(): void {
$this->assertValidPasswordReset($edit['name']);
$this->assertCount($before + 1, $this->drupalGetMails(['id' => 'user_password_reset']), 'Email sent when requesting password reset using email address.');
// Check that the email message body does not contain HTML entities
$this->assertTrue($this->checkBodyText(), 'The body text of the email contains no HTML entities');
// Visit the user edit page without pass-reset-token and make sure it does
// not cause an error.
$resetURL = $this->getResetURL();
......@@ -334,9 +337,9 @@ public function checkBodyText() {
$_emails = $this->drupalGetMails();
$email = end($_emails);
if(strip_tags($email['body']) === $email['body']) {
return FALSE;
} ;
return TRUE;
} ;
return FALSE;
}
/**
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment