filesystem = $this->get('oneup_flysystem.media_filesystem'); $this->em = $this->get('doctrine.orm.entity_manager'); } public function setUpDb() { // Make sure we are in the test environment if ('test' !== $this->get('kernel')->getEnvironment()) { throw new \LogicException('setUpDb must be executed in the test environment'); } // If you are using the Doctrine Fixtures Bundle you could load these here $this->loadFixtures([ LoadColors::class ]); } protected function get($service) { return $this->getContainer()->get($service); } protected function getParameter($parameter) { return $this->getContainer()->getParameter($parameter); } }