_container = self::$kernel->getContainer(); parent::__construct(); $this->filesystem = $this->get('oneup_flysystem.media_filesystem'); } public function setUpDb() { // Make sure we are in the test environment if ('test' !== self::$kernel->getEnvironment()) { throw new \LogicException('Primer 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->_container->get($service); } protected function getParameter($parameter) { return $this->_container->getParameter($parameter); } }