Magento 2 Documentation  2.3
Documentation for Magento 2 CMS v2.3 (December 2018)
AssertProductIsNotEditable.php
Go to the documentation of this file.
1 <?php
8 
9 use Magento\Checkout\Test\Page\CheckoutCart;
10 use Magento\Mtf\Constraint\AbstractConstraint;
11 
16 class AssertProductIsNotEditable extends AbstractConstraint
17 {
25  public function processAssert(CheckoutCart $checkoutCart, array $products)
26  {
27  foreach ($products as $product) {
28  \PHPUnit\Framework\Assert::assertFalse(
29  $checkoutCart->getCartBlock()->getCartItem($product)->isEditButtonVisible(),
30  'Added product is editable.'
31  );
32  }
33  }
34 
40  public function toString()
41  {
42  return 'Added products by sku to shopping cart are not editable';
43  }
44 }