public function tearDown() { parent::tearDown(); StaticContainer::clearContainer(); Log::unsetInstance(); @unlink(self::getLogFileLocation()); Log::$debugBacktraceForTests = null; }
/** * We will be simulating an HTTP request here (by including index.php). * * To avoid weird side-effects (e.g. the logging output messing up the HTTP response on the CLI output) * we need to recreate the container with the default environment instead of the CLI environment. */ private function recreateContainerWithWebEnvironment() { StaticContainer::clearContainer(); Log::unsetInstance(); $this->environment = new Environment(null); $this->environment->init(); }
/** * We will be simulating an HTTP request here (by including index.php). * * To avoid weird side-effects (e.g. the logging output messing up the HTTP response on the CLI output) * we need to recreate the container with the default environment instead of the CLI environment. */ private function recreateContainerWithWebEnvironment() { StaticContainer::setEnvironment(null); StaticContainer::clearContainer(); Log::unsetInstance(); }