Magento 2 Documentation  2.3
Documentation for Magento 2 CMS v2.3 (December 2018)
AssertTermSuccessDeleteMessage.php
Go to the documentation of this file.
1 <?php
8 
9 use Magento\CheckoutAgreements\Test\Page\Adminhtml\CheckoutAgreementIndex;
10 use Magento\Mtf\Constraint\AbstractConstraint;
11 
16 class AssertTermSuccessDeleteMessage extends AbstractConstraint
17 {
21  const SUCCESS_DELETE_MESSAGE = 'You deleted the condition.';
22 
29  public function processAssert(CheckoutAgreementIndex $agreementIndex)
30  {
31  \PHPUnit\Framework\Assert::assertEquals(
32  self::SUCCESS_DELETE_MESSAGE,
33  $agreementIndex->getMessagesBlock()->getSuccessMessage(),
34  'Wrong success delete message is displayed.'
35  );
36  }
37 
43  public function toString()
44  {
45  return 'Terms and Conditions success delete message is present.';
46  }
47 }