/** * @return void */ public function testDeleteTaxSetShouldDeleteSetButNotTheAssociatedRate() { $taxRateTransfer = $this->createTaxRateTransfer(); $rateId = $this->taxFacade->createTaxRate($taxRateTransfer)->getIdTaxRate(); $taxRateTransfer->setIdTaxRate($rateId); $taxRateQuery = SpyTaxRateQuery::create()->filterByIdTaxRate($rateId); $taxRateEntity = $taxRateQuery->findOne(); $this->assertNotEmpty($taxRateEntity); $taxSetTransfer = $this->createTaxSetTransfer(); $taxSetTransfer->addTaxRate($taxRateTransfer); $setId = $this->taxFacade->createTaxSet($taxSetTransfer)->getIdTaxSet(); $taxSetQuery = SpyTaxSetQuery::create()->filterByIdTaxSet($setId); $taxSetEntity = $taxSetQuery->findOne(); $this->assertNotEmpty($taxSetEntity); $this->taxFacade->deleteTaxSet($setId); $taxRateEntity = $taxRateQuery->findOne(); $this->assertNotEmpty($taxRateEntity); $taxSetEntity = $taxSetQuery->findOne(); $this->assertEmpty($taxSetEntity); }
/** * @return void */ public function testExceptionRaisedIfAttemptingToFetchNonExistentTaxSet() { $this->expectException('Spryker\\Zed\\Tax\\Business\\Model\\Exception\\ResourceNotFoundException'); $this->taxFacade->getTaxRate(self::NON_EXISTENT_ID); }
/** * @return void */ public function resetAccruedTaxCalculatorRoundingErrorDelta() { $this->taxFacade->resetAccruedTaxCalculatorRoundingErrorDelta(); }
/** * @return \Generated\Shared\Transfer\TaxSetCollectionTransfer */ public function getTaxSets() { return $this->taxFacade->getTaxSets(); }