public function _before(TestInterface $test) { $this->configFiles = null; $this->client = new NetteConnector(); $this->client->setContainerAccessor(function () { return $this->getModule(NetteDIModule::class)->getContainer(); }); $this->client->followRedirects($this->config['followRedirects']); parent::_before($test); }
public function _before(TestCase $test) { if (!class_exists(self::$containerClass)) { throw new ModuleConfigException(__CLASS__, 'Specify container class in bootstrap.'); } $this->container = new self::$containerClass(); $this->container->initialize(); $this->client = new NetteConnector(); $this->client->setContainer($this->container); $this->client->followRedirects($this->config['followRedirects']); parent::_before($test); }