Esempio n. 1
0
 /**
  * Assert that tax rule form filled right.
  *
  * @param TaxRuleNew $taxRuleNew
  * @param TaxRuleIndex $taxRuleIndex
  * @param TaxRule $taxRule
  * @return void
  */
 public function processAssert(TaxRuleNew $taxRuleNew, TaxRuleIndex $taxRuleIndex, TaxRule $taxRule)
 {
     $fixtureData = $taxRule->getData();
     $taxRuleIndex->open();
     $taxRuleIndex->getTaxRuleGrid()->searchAndOpen(['code' => $taxRule->getCode()]);
     $formData = $taxRuleNew->getTaxRuleForm()->getData($taxRule);
     $dataDiff = $this->verifyForm($formData, $fixtureData);
     \PHPUnit_Framework_Assert::assertEmpty($dataDiff, implode($dataDiff));
 }
Esempio n. 2
0
 /**
  * Assert tax rule availability in Tax Rule grid.
  *
  * @param TaxRuleIndex $taxRuleIndex
  * @param TaxRule $taxRule
  * @return void
  */
 public function processAssert(TaxRuleIndex $taxRuleIndex, TaxRule $taxRule)
 {
     $filter = ['code' => $taxRule->getCode()];
     $taxRuleIndex->open();
     \PHPUnit_Framework_Assert::assertTrue($taxRuleIndex->getTaxRuleGrid()->isRowVisible($filter), "Tax Rule '{$filter['code']}' is absent in Tax Rule grid.");
 }