function UserPasswordResetTest::assertPasswordIpFlood

Same name in other branches
  1. 9 core/modules/user/tests/src/Functional/UserPasswordResetTest.php \Drupal\Tests\user\Functional\UserPasswordResetTest::assertPasswordIpFlood()
  2. 8.9.x core/modules/user/tests/src/Functional/UserPasswordResetTest.php \Drupal\Tests\user\Functional\UserPasswordResetTest::assertPasswordIpFlood()
  3. 10 core/modules/user/tests/src/Functional/UserPasswordResetTest.php \Drupal\Tests\user\Functional\UserPasswordResetTest::assertPasswordIpFlood()

Makes assertions about a password reset triggering IP flood control.

@internal

1 call to UserPasswordResetTest::assertPasswordIpFlood()
UserPasswordResetTest::testUserResetPasswordIpFloodControl in core/modules/user/tests/src/Functional/UserPasswordResetTest.php
Tests password reset flood control for one IP.

File

core/modules/user/tests/src/Functional/UserPasswordResetTest.php, line 588

Class

UserPasswordResetTest
Ensure that password reset methods work as expected.

Namespace

Drupal\Tests\user\Functional

Code

public function assertPasswordIpFlood() : void {
    $this->assertSession()
        ->pageTextContains('Too many password recovery requests from your IP address. It is temporarily blocked. Try again later or contact the site administrator.');
}

Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.