Magento 2 Documentation  2.3
Documentation for Magento 2 CMS v2.3 (December 2018)
AssertUserPasswordResetFailed.php
Go to the documentation of this file.
1 <?php
8 
9 use Magento\Mtf\Constraint\AbstractConstraint;
11 
15 class AssertUserPasswordResetFailed extends AbstractConstraint
16 {
18  'We received too many requests for password resets. '
19  . 'Please wait and try again later or contact [email protected].';
20 
27  public function processAssert(AdminAuthLogin $adminAuth)
28  {
29  \PHPUnit\Framework\Assert::assertEquals(
30  self::TOO_MANY_RESET_REQUESTS_MESSAGE,
31  $adminAuth->getMessagesBlock()->getErrorMessage(),
32  'Wrong user reset password failed message is displayed.'
33  );
34  }
35 
41  public function toString()
42  {
43  return 'User reset password failed message is present on user login page.';
44  }
45 }