Esempio n. 1
0
 public function tearDown()
 {
     parent::tearDown();
     StaticContainer::clearContainer();
     Log::unsetInstance();
     @unlink(self::getLogFileLocation());
     Log::$debugBacktraceForTests = null;
 }
Esempio n. 2
0
 /**
  * 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();
 }
Esempio n. 3
0
 /**
  * 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();
 }