/** * Sets up the fixture, for example, open a network connection. * This method is called before a test is executed. * * @return void */ public function setUp() { Zend_Controller_Action_Helper_AutoCompleteTest_LayoutOverride::resetMvcInstance(); Zend_Controller_Action_HelperBroker::resetHelpers(); Zend_Controller_Action_HelperBroker::setPluginLoader(null); $this->request = new Zend_Controller_Request_Http(); $this->response = new Zend_Controller_Response_Cli(); $this->front = Zend_Controller_Front::getInstance(); $this->front->resetInstance(); $this->front->setRequest($this->request)->setResponse($this->response); $this->viewRenderer = Zend_Controller_Action_HelperBroker::getStaticHelper('viewRenderer'); $this->layout = Zend_Layout::startMvc(); }
/** * @group ZF-4704 */ public function testBrokerShouldAcceptCustomPluginLoaderInstance() { $loader = Zend_Controller_Action_HelperBroker::getPluginLoader(); $custom = new Zend_Loader_PluginLoader(); Zend_Controller_Action_HelperBroker::setPluginLoader($custom); $test = Zend_Controller_Action_HelperBroker::getPluginLoader(); $this->assertNotSame($loader, $test); $this->assertSame($custom, $test); }