initEnvironment(); Fixture::clearInMemoryCaches($resetTranslations = false); File::reset(); } public function tearDown(): void { File::reset(); Fixture::clearInMemoryCaches($resetTranslations = false); // make sure the global container exists for the next test case that is executed (since logging can be done // before a test sets up an environment) $nextTestEnviornment = new Environment($environment = null, array()); $nextTestEnviornment->init(); parent::tearDown(); } /** * Use this method to return custom container configuration that you want to apply for the tests. * * @return array */ protected function provideContainerConfig() { return array(); } protected function initEnvironment() { $this->environment = new Environment($environment = null, $this->provideContainerConfig(), $postBootstrappedEvent = false); $this->environment->init(); } }