Magento 2 Documentation  2.3
Documentation for Magento 2 CMS v2.3 (December 2018)
AssertCustomerSuccessRegisterMessage.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 AssertCustomerSuccessRegisterMessage extends AbstractConstraint
16 {
17  const SUCCESS_MESSAGE = 'Thank you for registering with Main Website Store.';
18 
25  public function processAssert(CustomerAccountCreate $registerPage)
26  {
27  $actualMessage = $registerPage->getMessagesBlock()->getSuccessMessage();
28  \PHPUnit\Framework\Assert::assertEquals(
29  self::SUCCESS_MESSAGE,
30  $actualMessage,
31  'Wrong success message is displayed.'
32  . "\nExpected: " . self::SUCCESS_MESSAGE
33  . "\nActual: " . $actualMessage
34  );
35  }
36 
42  public function toString()
43  {
44  return "Customer is successfully registered.";
45  }
46 }