Magento 2 Documentation  2.3
Documentation for Magento 2 CMS v2.3 (December 2018)
AssertCustomerSuccessDeleteMessage.php
Go to the documentation of this file.
1 <?php
8 
9 use Magento\Customer\Test\Page\Adminhtml\CustomerIndex;
10 use Magento\Mtf\Constraint\AbstractConstraint;
11 
15 class AssertCustomerSuccessDeleteMessage extends AbstractConstraint
16 {
17  const DELETE_MESSAGE = 'You deleted the customer.';
18 
25  public function processAssert(CustomerIndex $customerIndexPage)
26  {
27  $actualMessage = $customerIndexPage->getMessagesBlock()->getSuccessMessage();
28  \PHPUnit\Framework\Assert::assertEquals(
29  self::DELETE_MESSAGE,
30  $actualMessage,
31  'Wrong success message is displayed.'
32  . "\nExpected: " . self::DELETE_MESSAGE
33  . "\nActual: " . $actualMessage
34  );
35  }
36 
42  public function toString()
43  {
44  return 'Assert that success delete message is displayed.';
45  }
46 }