You are here

protected function LoginSecurityUserBlockingTest::getAttemptsAvailableMessage in Login Security 2.x

Returns the 'get attempts available' message.

Parameters

int $attempt: The attempt count.

int $attempts_limit: The attempts limit number.

Return value

string Returns the related message.

1 call to LoginSecurityUserBlockingTest::getAttemptsAvailableMessage()
LoginSecurityUserBlockingTest::testUserBlocking in tests/src/Functional/LoginSecurityUserBlockingTest.php
Test user blocking.

File

tests/src/Functional/LoginSecurityUserBlockingTest.php, line 52

Class

LoginSecurityUserBlockingTest
Test Login Security's user-blocking restrictions and default messages.

Namespace

Drupal\Tests\login_security\Functional

Code

protected function getAttemptsAvailableMessage($attempt, $attempts_limit) {
  $variables = [
    '@attempt' => $attempt,
    '@login_attempts_limit' => $attempts_limit,
  ];
  return new FormattableMarkup('You have used @attempt out of @login_attempts_limit login attempts. After all @login_attempts_limit have been used, you will be unable to login.', $variables);
}