/** * Retrieve front controller for concrete API type (factory method). * * @return Mage_Webapi_Controller_DispatcherInterface * @throws Mage_Core_Exception */ protected function _getDispatcher() { if (is_null($this->_dispatcher)) { $this->_dispatcher = $this->_dispatcherFactory->get($this->determineApiType()); } return $this->_dispatcher; }
public function testGet() { $expectedController = $this->getMockBuilder('Mage_Webapi_Controller_Dispatcher_Soap')->disableOriginalConstructor()->getMock(); $this->_objectManager->expects($this->once())->method('get')->will($this->returnValue($expectedController)); $this->assertEquals($expectedController, $this->_dispatcherFactory->get(Mage_Webapi_Controller_Front::API_TYPE_SOAP)); }