Magento 2 Documentation  2.3
Documentation for Magento 2 CMS v2.3 (December 2018)
AssertTaxRuleNotInGrid.php
Go to the documentation of this file.
1 <?php
8 
10 use Magento\Tax\Test\Page\Adminhtml\TaxRuleIndex;
11 use Magento\Mtf\Constraint\AbstractConstraint;
12 
16 class AssertTaxRuleNotInGrid extends AbstractConstraint
17 {
25  public function processAssert(
26  TaxRuleIndex $taxRuleIndex,
27  TaxRule $taxRule
28  ) {
29  $filter = [
30  'code' => $taxRule->getCode(),
31  ];
32 
33  $taxRuleIndex->open();
34  \PHPUnit\Framework\Assert::assertFalse(
35  $taxRuleIndex->getTaxRuleGrid()->isRowVisible($filter),
36  'Tax Rule \'' . $filter['code'] . '\' is present in Tax Rule grid.'
37  );
38  }
39 
45  public function toString()
46  {
47  return 'Tax rule is absent in grid.';
48  }
49 }
$taxRule
Definition: tax_rule.php:35
processAssert(TaxRuleIndex $taxRuleIndex, TaxRule $taxRule)