Exemple #1
0
 /**
  * @magentoDbIsolation enabled
  * @expectedException \Magento\Framework\Exception\InputException
  * @expectedExceptionMessage postcode
  */
 public function testUpdateTaxRateMissingRequiredFields()
 {
     $taxRate = $this->taxRateBuilder->setCountryId('US')->setRegionId(42)->setPercentageRate(8.25)->setCode('UpdateTaxRates')->setPostcode('78780')->create();
     $taxRate = $this->taxRateService->createTaxRate($taxRate);
     $updatedTaxRate = $this->taxRateBuilder->populate($taxRate)->setPostcode(null)->create();
     $this->taxRateService->updateTaxRate($updatedTaxRate);
 }
Exemple #2
0
 /**
  * @expectedException \Magento\Framework\Exception\InputException
  */
 public function testUpdateTaxRateMissingRequiredInfo()
 {
     $taxRate = $this->taxRateBuilder->setId(2)->setCode('Rate-Code')->setCountryId('US')->setPercentageRate(0.1)->setRegionId('TX')->create();
     $this->taxRateService->updateTaxRate($taxRate);
 }