diff --git a/core/modules/user/tests/src/Functional/UserMailChangeTest.php b/core/modules/user/tests/src/Functional/UserMailChangeTest.php index c1b88219..cdc1b4e 100644 --- a/core/modules/user/tests/src/Functional/UserMailChangeTest.php +++ b/core/modules/user/tests/src/Functional/UserMailChangeTest.php @@ -40,7 +40,7 @@ protected function setUp() { public function testMailChange() { $this->drupalLogin($this->account); - // Save a new email and verify that the user has sent an email. + // Change the user email address. $new_mail = $this->getRandomEmailAddress(); $edit = [ 'mail' => $new_mail, @@ -91,13 +91,15 @@ public function testMailChangeNoVerification() { ->save(); $this->drupalLogin($this->account); - // Save a new email and verify that the user has sent an email. + // Change the user email address. $new_mail = $this->getRandomEmailAddress(); $edit = [ 'mail' => $new_mail, 'current_pass' => $this->account->pass_raw, ]; $this->drupalPostForm($this->account->toUrl('edit-form'), $edit, t('Save')); + + // Check that the validation status message has not been displayed. $this->assertSession()->pageTextNotContains(t('Your new email address needs to be validated. Further instructions have been sent to your new email address.')); // Check that no E-mail was sent to the old or to the new address.