/** * Test that the controller method ebayenterprise_order/factory::getCustomerSession() * is invoked and it will instantiate an object of type customer/session and return this object. */ public function testGetCustomerSession() { /** @var Mock_Mage_Customer_Model_Session */ $session = $this->getModelMockBuilder('customer/session')->disableOriginalConstructor()->getMock(); $this->replaceByMock('singleton', 'customer/session', $session); $this->assertSame($session, $this->_factory->getCustomerSession()); }
/** * Determine the cancel order URL path based the customer logging status. * * @return string */ protected function _getCancelUrlPath() { return $this->_factory->getCustomerSession()->isLoggedIn() ? static::LOGGED_IN_CANCEL_URL_PATH : static::GUEST_CANCEL_URL_PATH; }