Magento 2 Documentation  2.3
Documentation for Magento 2 CMS v2.3 (December 2018)
AssertPasswordIsNotSecureEnoughMessage.php
Go to the documentation of this file.
1 <?php
8 
9 use Magento\Customer\Test\Page\CustomerAccountCreate;
10 use Magento\Mtf\Constraint\AbstractConstraint;
11 
15 class AssertPasswordIsNotSecureEnoughMessage extends AbstractConstraint
16 {
24  public function processAssert(CustomerAccountCreate $registerPage)
25  {
26  $expectedErrorMessage = 'Minimum of different classes of characters in password is 3.' .
27  ' Classes of characters: Lower Case, Upper Case, Digits, Special Characters.';
28  $errorMessage = $registerPage->getRegisterForm()->getPasswordError();
29  \PHPUnit\Framework\Assert::assertEquals(
30  $expectedErrorMessage,
31  $errorMessage,
32  'The messages are not equal.'
33  );
34  }
35 
41  public function toString()
42  {
43  return 'Password insecure message is present on customer registration page.';
44  }
45 }