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