Magento 2 Documentation  2.3
Documentation for Magento 2 CMS v2.3 (December 2018)
AssertLowStockProductInGrid.php
Go to the documentation of this file.
1 <?php
8 
10 use Magento\Reports\Test\Page\Adminhtml\ProductLowStock;
11 use Magento\Mtf\Constraint\AbstractConstraint;
12 
17 class AssertLowStockProductInGrid extends AbstractConstraint
18 {
26  public function processAssert(CatalogProductSimple $product, ProductLowStock $productLowStock)
27  {
28  $productLowStock->open();
29  \PHPUnit\Framework\Assert::assertTrue(
30  $productLowStock->getLowStockGrid()->isRowVisible(['name' => $product->getName()]),
31  'Product with Low Stock is absent in Low Stock grid.'
32  );
33  }
34 
40  public function toString()
41  {
42  return 'Product with Low Stock is present in Low Stock grid.';
43  }
44 }
processAssert(CatalogProductSimple $product, ProductLowStock $productLowStock)