Magento 2 Documentation  2.3
Documentation for Magento 2 CMS v2.3 (December 2018)
AssertChangePasswordFailMessage.php
Go to the documentation of this file.
1 <?php
8 
9 use Magento\Customer\Test\Page\CustomerAccountEdit;
10 use Magento\Mtf\Constraint\AbstractConstraint;
11 
16 class AssertChangePasswordFailMessage extends AbstractConstraint
17 {
21  const FAIL_MESSAGE = "The password doesn't match this account. Verify the password and try again.";
22 
29  public function processAssert(CustomerAccountEdit $customerAccountEdit)
30  {
31  \PHPUnit\Framework\Assert::assertEquals(
32  self::FAIL_MESSAGE,
33  $customerAccountEdit->getMessages()->getErrorMessage()
34  );
35  }
36 
42  public function toString()
43  {
44  return 'Fail message is displayed.';
45  }
46 }