Exemplo n.º 1
0
 /**
  * Sets up the fixture, for example, open a network connection.
  * This method is called before a test is executed.
  *
  * @return void
  */
 public function setUp()
 {
     Layout::resetMvcInstance();
     HelperBroker::resetHelpers();
     HelperBroker::setPluginLoader(null);
     $this->request = new HTTPRequest();
     $this->response = new CLIResponse();
     $this->front = FrontController::getInstance();
     $this->front->resetInstance();
     $this->front->setRequest($this->request)->setResponse($this->response);
     $this->viewRenderer = HelperBroker::getStaticHelper('viewRenderer');
     $this->layout = Layout::startMvc();
 }
Exemplo n.º 2
0
 /**
  * @group ZF-4704
  */
 public function testBrokerShouldAcceptCustomPluginLoaderInstance()
 {
     $loader = HelperBroker::getPluginLoader();
     $custom = new PluginLoader();
     HelperBroker::setPluginLoader($custom);
     $test = HelperBroker::getPluginLoader();
     $this->assertNotSame($loader, $test);
     $this->assertSame($custom, $test);
 }