Magento 2 Documentation  2.3
Documentation for Magento 2 CMS v2.3 (December 2018)
AssertStoredPaymentDeletedMessage.php
Go to the documentation of this file.
1 <?php
7 
8 use Magento\Vault\Test\Page\StoredPaymentMethods;
9 use Magento\Mtf\Constraint\AbstractConstraint;
10 
14 class AssertStoredPaymentDeletedMessage extends AbstractConstraint
15 {
19  const SUCCESS_MESSAGE = 'Stored Payment Method was successfully removed';
20 
26  public function processAssert(StoredPaymentMethods $storedPaymentMethods)
27  {
28  \PHPUnit\Framework\Assert::assertEquals(
29  self::SUCCESS_MESSAGE,
30  $storedPaymentMethods->getMessagesBlock()->getSuccessMessage(),
31  'Message of success deletion of stored payment method is not present or wrong.'
32  );
33  }
34 
40  public function toString()
41  {
42  return 'Success message on Store Payment Methods page is correct.';
43  }
44 }