public function setUp() { $this->_taxCollector = $this->getModelMock('ebayenterprise_tax/collector', ['getTaxRecords']); $this->_payloadHelper = $this->getHelperMock('ebayenterprise_tax/payload', ['taxRecordToTaxPayload']); $this->_address = $this->getModelMock('sales/order_address', ['getQuoteAddressId']); $this->_address->expects($this->any())->method('getQuoteAddressId')->will($this->returnValue($this->_quoteAddressId)); // SDK Payloads that are expected to be filled out. $this->_shipGroup = $this->getMockForAbstractClass('eBayEnterprise\\RetailOrderManagement\\Payload\\Order\\IGifting', ['getGiftPricing', 'getEmptyGiftingPriceGroup', 'setGiftPricing']); $this->_taxContainer = $this->getMockForAbstractClass('eBayEnterprise\\RetailOrderManagement\\Payload\\Order\\IPriceGroup', ['getTaxes', 'setTaxes']); $this->_taxIterable = $this->getMockForAbstractClass('eBayEnterprise\\RetailOrderManagement\\Payload\\Order\\ITaxIterable', ['offsetSet', 'getEmptyTax']); $this->_taxPayload = $this->getMockForAbstractClass('eBayEnterprise\\RetailOrderManagement\\Payload\\Order\\ITax'); // Create this as the expected tax payload to be added to the // tax iterable - assume this to be a tax payload with all data // from a tax record set to it. $this->_completeTaxPayload = $this->getMockForAbstractClass('eBayEnterprise\\RetailOrderManagement\\Payload\\Order\\ITax'); // The tax container will always return a tax iterable. $this->_taxContainer->expects($this->any())->method('getTaxes')->will($this->returnValue($this->_taxIterable)); $this->_addressGiftTax = $this->_mockTaxRecord(EbayEnterprise_Tax_Model_Record::SOURCE_ADDRESS_GIFTING, $this->_quoteAddressId); $this->_itemGiftTax = $this->_mockTaxRecord(EbayEnterprise_Tax_Model_Record::SOURCE_ITEM_GIFTING, $this->_quoteAddressId); $this->_merchGiftTax = $this->_mockTaxRecord(EbayEnterprise_Tax_Model_Record::SOURCE_MERCHANDISE, $this->_quoteAddressId); $this->_shipGroupHandler = Mage::getModel('ebayenterprise_tax/order_create_shipgroup', ['address' => $this->_address, 'ship_group' => $this->_shipGroup, 'tax_collector' => $this->_taxCollector, 'payload_helper' => $this->_payloadHelper]); }