Magento 2 Documentation  2.3
Documentation for Magento 2 CMS v2.3 (December 2018)
AssertProductsInStock.php
Go to the documentation of this file.
1 <?php
8 
9 use Magento\Catalog\Test\Page\Product\CatalogProductView;
10 use Magento\Mtf\Client\BrowserInterface;
11 use Magento\Mtf\Constraint\AbstractConstraint;
12 
16 class AssertProductsInStock extends AbstractConstraint
17 {
27  public function processAssert(
28  CatalogProductView $catalogProductView,
29  BrowserInterface $browser,
30  AssertProductInStock $assertProductInStock,
31  array $products
32  ) {
33  foreach ($products as $product) {
34  $assertProductInStock->processAssert($catalogProductView, $browser, $product);
35  }
36  }
37 
43  public function toString()
44  {
45  return 'In stock control is visible for each product.';
46  }
47 }
processAssert(CatalogProductView $catalogProductView, BrowserInterface $browser, AssertProductInStock $assertProductInStock, array $products)
processAssert(CatalogProductView $catalogProductView, BrowserInterface $browser, FixtureInterface $product)