/** * Test that the helper method ebayenterprise_order/factory::getNewRomOrderSearch() * when invoked it will be passed in, as parameter, a string literal customer id. Then, * it will proceed to instantiate ebayenterprise_order/search object * passing in the an array with required key 'customer_id' to the constructor method. * Finally, the helper method ebayenterprise_order/factory::getNewRomOrderSearch() * will return the ebayenterprise_order/search object. */ public function testGetNewRomOrderSearch() { /** @var string */ $customerId = '006512'; /** @var EbayEnterprise_Order_Model_Search */ $search = $this->getModelMock('ebayenterprise_order/search', [], false, [['customer_id' => $customerId]]); $this->replaceByMock('model', 'ebayenterprise_order/search', $search); $this->assertSame($search, $this->_factory->getNewRomOrderSearch($customerId)); }
/** * Make ROM order summary search when we have a valid logged in customer * id in the customer session otherwise simply return an empty collection. * * @return Varien_Data_Collection */ public function getCurCustomerOrders() { $customerId = $this->_getPrefixedCurrentCustomerId(); return !is_null($customerId) ? $this->_factory->getNewRomOrderSearch($customerId)->process() : $this->_coreHelper->getNewVarienDataCollection(); }