diff --git a/core/modules/user/tests/src/Functional/UserLoginTest.php b/core/modules/user/tests/src/Functional/UserLoginTest.php index 64537e2..99c9329 100644 --- a/core/modules/user/tests/src/Functional/UserLoginTest.php +++ b/core/modules/user/tests/src/Functional/UserLoginTest.php @@ -69,11 +69,13 @@ public function testGlobalLoginFloodControl() { // A login with the correct password should also result in a flood error // message. $this->assertFailedLogin($user1, 'ip'); + + // A login attempt after resetting the password should still fail, since the + // IP-based flood control count is not cleared after a password reset. $this->resetUserPassword($user1); $this->drupalLogout(); - // Try to login as user 1, it should be successful. - $this->drupalLogin($user1); - $this->assertSession()->responseNotContains('Too many failed login attempts from your IP address.'); + $this->assertFailedLogin($user1, 'ip'); + $this->assertSession()->responseContains('Too many failed login attempts from your IP address.'); } /**