diff --git a/core/modules/user/lib/Drupal/user/Form/UserPasswordForm.php b/core/modules/user/lib/Drupal/user/Form/UserPasswordForm.php index d776161..2a84aae 100644 --- a/core/modules/user/lib/Drupal/user/Form/UserPasswordForm.php +++ b/core/modules/user/lib/Drupal/user/Form/UserPasswordForm.php @@ -151,7 +151,7 @@ public function validateForm(array &$form, array &$form_state) { } } else { - $this->setFormError('name', $form_state, $this->t('Reset password limit exceeded. Please contact technical support for further assistance.')); + $this->setFormError('name', $form_state, $this->t('Reset password limit exceeded. Please contact technical support for further assistance.')); } } diff --git a/core/modules/user/lib/Drupal/user/Tests/UserPasswordResetTest.php b/core/modules/user/lib/Drupal/user/Tests/UserPasswordResetTest.php index 3eb1132..718bcf8 100644 --- a/core/modules/user/lib/Drupal/user/Tests/UserPasswordResetTest.php +++ b/core/modules/user/lib/Drupal/user/Tests/UserPasswordResetTest.php @@ -131,7 +131,7 @@ public function testUserResetPasswordTextboxFilled() { } /** - * Test password reset flood control. + * Tests password reset flood control. */ public function testUserResetPasswordFloodControl() { \Drupal::config('user.flood') @@ -148,27 +148,27 @@ public function testUserResetPasswordFloodControl() { } /** - * Make a password request. + * Makes a password request. * * This test checks both that the correct messaging is shown and that * e-mail notifications are sent to the user in case of successful request. * - * @param $name + * @param string $name * The user name or email address to use for the request. - * @param $valid_trigger + * @param bool $valid_trigger * Whether of not to expect the $name is valid. - * @param $flood_trigger + * @param bool $flood_trigger * Whether or not to expect that the flood control mechanism will be * triggered. */ - public function assertPasswordReset($name, $valid_trigger = TRUE, $flood_trigger = NULL) { + public function assertPasswordReset($name, $valid_trigger = TRUE, $flood_trigger = FALSE) { $this->drupalGet('user/password'); $edit = array('name' => $name); $this->drupalPostForm(NULL, $edit, t('E-mail new password')); - if (isset($flood_trigger)) { - $this->assertText(t('Reset password limit exceeded. Please contact technical support for further assistance.'), 'Flood error message shown.'); + if ($flood_trigger) { + $this->assertText(t('Reset password limit exceeded. Please contact technical support for further assistance.'), 'Flood error message shown.'); } else { if ($valid_trigger) { @@ -186,4 +186,5 @@ public function assertPasswordReset($name, $valid_trigger = TRUE, $flood_trigger } } } + }