Magento 2 Documentation  2.3
Documentation for Magento 2 CMS v2.3 (December 2018)
AssertWishlistShareMessage.php
Go to the documentation of this file.
1 <?php
8 
9 use Magento\Wishlist\Test\Page\WishlistIndex;
10 use Magento\Mtf\Constraint\AbstractConstraint;
11 
16 class AssertWishlistShareMessage extends AbstractConstraint
17 {
18  /* tags */
19  const SEVERITY = 'low';
20  /* end tags */
21 
25  const SUCCESS_MESSAGE = 'Your wish list has been shared.';
26 
33  public function processAssert(WishlistIndex $wishlistIndex)
34  {
35  \PHPUnit\Framework\Assert::assertEquals(
36  self::SUCCESS_MESSAGE,
37  $wishlistIndex->getMessagesBlock()->getSuccessMessage(),
38  'Wrong success message is displayed.'
39  );
40  }
41 
47  public function toString()
48  {
49  return 'Wish List success share message is present.';
50  }
51 }