protected function setUp()
 {
     $this->payloadHelper = Mage::helper('ebayenterprise_inventory/quantity_payload');
     $this->inventoryHelper = $this->getHelperMock('ebayenterprise_inventory', ['getRomSku']);
     $this->inventoryHelper->method('getRomSku')->will($this->returnArgument(0));
     // Swap out the inventory helper instance referenced by the payload helper
     // with the mock for consistent behavior during tests.
     $this->origInventoryHelper = EcomDev_Utils_Reflection::getRestrictedPropertyValue($this->payloadHelper, 'inventoryHelper');
     EcomDev_Utils_Reflection::setRestrictedPropertyValue($this->payloadHelper, 'inventoryHelper', $this->inventoryHelper);
 }
 public function setUp()
 {
     parent::setUp();
     // Prevent log context from needing session while gather context data for logging.
     $this->logContext = $this->getHelperMock('ebayenterprise_magelog/context', ['getMetaData']);
     $this->logContext->method('getMetaData')->will($this->returnValue([]));
     $this->api = $this->getMock('\\eBayEnterprise\\RetailOrderManagement\\Api\\IBidirectionalApi');
     $this->configModel = $this->buildCoreConfigRegistry(['apiService' => 'inventory', 'apiOperation' => 'allocate']);
     $this->helper = $this->getHelperMock('ebayenterprise_inventory');
     $this->helper->method('getConfigModel')->will($this->returnValue($this->configModel));
     $this->coreHelper = $this->getHelperMock('eb2ccore', ['getSdkApi']);
     $this->coreHelper->method('getSdkApi')->will($this->returnValue($this->api));
 }