Magento 2 Documentation  2.3
Documentation for Magento 2 CMS v2.3 (December 2018)
AssertTaxRateNotInTaxRule.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\TaxRuleNew;
11 use Magento\Mtf\Constraint\AbstractConstraint;
12 
16 class AssertTaxRateNotInTaxRule extends AbstractConstraint
17 {
25  public function processAssert(
27  TaxRuleNew $taxRuleNew
28  ) {
29  $taxRuleNew->open();
30  $taxRatesList = $taxRuleNew->getTaxRuleForm()->getAllTaxRates();
31  \PHPUnit\Framework\Assert::assertFalse(
32  in_array($taxRate->getCode(), $taxRatesList),
33  'Tax Rate \'' . $taxRate->getCode() . '\' is present in Tax Rule form.'
34  );
35  }
36 
42  public function toString()
43  {
44  return 'Tax rate is absent in tax rule from.';
45  }
46 }
processAssert(TaxRate $taxRate, TaxRuleNew $taxRuleNew)
jquery extjs ext tree mage adminhtml form
Definition: tree.phtml:41
$taxRate
Definition: tax_rule.php:12