Magento 2 Documentation  2.3
Documentation for Magento 2 CMS v2.3 (December 2018)
AssertCustomerGroupAlreadyExists.php
Go to the documentation of this file.
1 <?php
8 
9 use Magento\Customer\Test\Page\Adminhtml\CustomerGroupNew;
10 use Magento\Mtf\Constraint\AbstractConstraint;
11 
15 class AssertCustomerGroupAlreadyExists extends AbstractConstraint
16 {
17  const ERROR_MESSAGE = 'Customer Group already exists.';
18 
25  public function processAssert(CustomerGroupNew $customerGroupNew)
26  {
27  $actualMessage = $customerGroupNew->getMessagesBlock()->getErrorMessage();
28  \PHPUnit\Framework\Assert::assertEquals(
29  self::ERROR_MESSAGE,
30  $actualMessage,
31  'Wrong error message is displayed.'
32  );
33  }
34 
40  public function toString()
41  {
42  return 'Customer group already exist.';
43  }
44 }