Exemple #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'] = '';
 }
Exemple #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'] = '';
 }
Exemple #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);
    }
Exemple #4
0
 protected function getInternalDomains()
 {
     /**
      * @var Zend\Mvc\Router\Http\TreeRouteStack
      */
     $router = $this->client->grabServiceFromContainer('router');
     $this->domainCollector = [];
     $this->addInternalDomainsFromRoutes($router->getRoutes());
     return array_unique($this->domainCollector);
 }