Beispiel #1
0
 public function _before(\Codeception\TestCase $test)
 {
     $this->application = Application::init($this->applicationConfig);
     $events = $this->application->getEventManager();
     $events->detach($this->application->getServiceManager()->get('SendResponseListener'));
     $this->client->setApplication($this->application);
     $_SERVER['REQUEST_URI'] = '';
 }
Beispiel #2
0
 public function _before(TestInterface $test)
 {
     $this->client = new ZF2Connector();
     $this->application = Application::init($this->applicationConfig);
     $events = $this->application->getEventManager();
     $events->detach($this->application->getServiceManager()->get('SendResponseListener'));
     $this->client->setApplication($this->application);
     $_SERVER['REQUEST_URI'] = '';
 }
Beispiel #3
0
    public function _before(\Codeception\TestCase $test) {
        $applicationConfig = require \Codeception\Configuration::projectDir() . $this->config['config'];
        if (isset($applicationConfig['module_listener_options']['config_cache_enabled'])) {
            $applicationConfig['module_listener_options']['config_cache_enabled'] = false;
        }
        Console::overrideIsConsole(false);
        $this->application = Application::init($applicationConfig);
        $events = $this->application->getEventManager();
        $events->detach($this->application->getServiceManager()->get('SendResponseListener'));

        $this->client->setApplication($this->application);
    }