Magento 2 Documentation  2.3
Documentation for Magento 2 CMS v2.3 (December 2018)
AssertUserIsLocked.php
Go to the documentation of this file.
1 <?php
8 
10 use Magento\Mtf\Constraint\AbstractConstraint;
11 
15 class AssertUserIsLocked extends AbstractConstraint
16 {
17  const USER_ACCOUNT_DISABLED_MESSAGE = 'The account sign-in was incorrect or your account is disabled temporarily. '
18  . 'Please wait and try again later.';
19 
26  public function processAssert(
27  AdminAuthLogin $adminAuth
28  ) {
29  $ignoreCase = true;
30  \PHPUnit\Framework\Assert::assertContains(
31  self::USER_ACCOUNT_DISABLED_MESSAGE,
32  $adminAuth->getMessagesBlock()->getErrorMessage(),
33  'Message "' . self::USER_ACCOUNT_DISABLED_MESSAGE . '" is not visible.',
34  $ignoreCase
35  );
36  }
37 
43  public function toString()
44  {
45  return 'User account locked message is displayed on user login page.';
46  }
47 }