Magento 2 Documentation  2.3
Documentation for Magento 2 CMS v2.3 (December 2018)
AssertProductsOutOfStock.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 AssertProductsOutOfStock extends AbstractConstraint
17 {
27  public function processAssert(
28  CatalogProductView $catalogProductView,
29  BrowserInterface $browser,
30  AssertProductOutOfStock $assertProductOutOfStock,
31  array $products
32  ) {
33  foreach ($products as $product) {
34  $assertProductOutOfStock->processAssert($catalogProductView, $browser, $product);
35  }
36  }
37 
43  public function toString()
44  {
45  return 'All products have Out of Stock status.';
46  }
47 }
processAssert(CatalogProductView $catalogProductView, BrowserInterface $browser, AssertProductOutOfStock $assertProductOutOfStock, array $products)
processAssert(CatalogProductView $catalogProductView, BrowserInterface $browser, FixtureInterface $product)