Magento 2 Documentation  2.3
Documentation for Magento 2 CMS v2.3 (December 2018)
AssertProductPriceIsNotZero.php
Go to the documentation of this file.
1 <?php
8 
9 class AssertProductPriceIsNotZero extends \Magento\Mtf\Constraint\AbstractConstraint
10 {
21  public function processAssert(
22  \Magento\Cms\Test\Page\CmsIndex $cmsIndex,
23  \Magento\Customer\Test\Page\CustomerAccountIndex $customerAccountIndex,
24  \Magento\Wishlist\Test\Page\WishlistIndex $wishlistIndex,
25  \Magento\Mtf\Fixture\InjectableFixture $product
26  ) {
27  $cmsIndex->getLinksBlock()->openLink('My Account');
28  $customerAccountIndex->getAccountMenuBlock()->openMenuItem('My Wish List');
29  $wishlistItem = $wishlistIndex->getWishlistBlock()->getProductItemsBlock()->getItemProduct($product);
30 
31  \PHPUnit\Framework\Assert::assertNotEquals(
32  '0.00',
33  $wishlistItem->getPrice(),
34  $product->getName() . ' has zero price on Wish List page.'
35  );
36  }
37 
43  public function toString()
44  {
45  return 'Product price is not zero in default Wish List.';
46  }
47 }
processAssert(\Magento\Cms\Test\Page\CmsIndex $cmsIndex, \Magento\Customer\Test\Page\CustomerAccountIndex $customerAccountIndex, \Magento\Wishlist\Test\Page\WishlistIndex $wishlistIndex, \Magento\Mtf\Fixture\InjectableFixture $product)