コード例 #1
0
 /**
  * When the tax collector fails to collect new tax data, the session should
  * not get updated and quote totals should not be recollected.
  */
 public function testHandleSalesQuoteCollectTotalsCollectFailure()
 {
     // Indicate new tax collection is required in the session flags.
     $this->coreSession->expects($this->any())->method('isTaxUpdateRequired')->will($this->returnValue(true));
     // Set the tax collector to fail to make the TDF request and throw
     // an exception.
     $this->taxCollector->expects($this->once())->method('collectTaxes')->will($this->throwException(Mage::exception('EbayEnterprise_Tax_Exception_Collector')));
     // Ensure session quote data is not updated, flags are not reset and
     // quote totals are not re-collected.
     $this->coreSession->expects($this->never())->method('updateWithQuote');
     $this->coreSession->expects($this->never())->method('resetTaxUpdateRequired');
     $this->quote->expects($this->never())->method('collectTotals');
     $this->taxObserver->handleSalesQuoteCollectTotalsAfter($this->eventObserver);
 }