Magento 2 Documentation  2.3
Documentation for Magento 2 CMS v2.3 (December 2018)
AssertCustomerFailRegisterMessage.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 AssertCustomerFailRegisterMessage extends AbstractConstraint
16 {
23  public function processAssert(CustomerAccountCreate $registerPage)
24  {
25  $errorMessage = $registerPage->getMessagesBlock()->getErrorMessage();
26  \PHPUnit\Framework\Assert::assertNotEmpty(
27  $errorMessage,
28  'No error message is displayed.'
29  );
30  }
31 
37  public function toString()
38  {
39  return 'Assert that error message is displayed.';
40  }
41 }