public function setUp() { // Create a mock tax collector to provide tax duties and overall // tax request success. Constructor disabled to prevent needing // to provide dependencies. $this->_taxCollector = $this->getModelMockBuilder('ebayenterprise_tax/collector')->disableOriginalConstructor()->setMethods(['getTaxDuties', 'getTaxRequestSuccess'])->getMock(); // Valid record should not return a value for the calculation error. // Constructor disabled to prevent needing to provide dependencies. $this->_validTaxRecord = $this->getModelMockBuilder('ebayenterprise_tax/record')->disableOriginalConstructor()->setMethods(['getCalculationError'])->getMock(); // Error record should return some value for the calculation error. // Constructor disabled to prevent needing to provide dependencies. $this->_errorTaxRecord = $this->getModelMockBuilder('ebayenterprise_tax/record')->disableOriginalConstructor()->setMethods(['getCalculationError'])->getMock(); $this->_errorTaxRecord->expects($this->any())->method('getCalculationError')->will($this->returnValue('Calculation Error')); $this->_order = Mage::getModel('sales/order'); $this->_orderCreateRequest = $this->getMockForAbstractClass('eBayEnterprise\\RetailOrderManagement\\Payload\\Order\\IOrderCreateRequest', ['setTaxHasErrors']); $this->_orderCreateHandler = Mage::getModel('ebayenterprise_tax/order_create_order', ['tax_collector' => $this->_taxCollector, 'order' => $this->_order, 'order_create_request' => $this->_orderCreateRequest]); }