Magento 2 Documentation  2.3
Documentation for Magento 2 CMS v2.3 (December 2018)
AssertCustomerLoginErrorMessage.php
Go to the documentation of this file.
1 <?php
8 
9 use Magento\Customer\Test\Page\CustomerAccountLogin;
10 use Magento\Mtf\Constraint\AbstractConstraint;
11 
15 class AssertCustomerLoginErrorMessage extends AbstractConstraint
16 {
20  const ERROR_MESSAGE =
21  'The account sign-in was incorrect or your account is disabled temporarily. Please wait and try again later.';
22 
29  public function processAssert(
30  CustomerAccountLogin $customerLogin
31  ) {
32  \PHPUnit\Framework\Assert::assertEquals(
33  self::ERROR_MESSAGE,
34  $customerLogin->getMessages()->getErrorMessage(),
35  'Wrong error message is displayed.'
36  );
37  }
38 
44  public function toString()
45  {
46  return 'Customer login error message is displayed.';
47  }
48 }