boot(); $container = $kernel->getContainer(); $this->assertInstanceOf(MarkdownParser::class, $container->get('markdown.parser')); } } class IntegrationKernel extends Kernel { use MicroKernelTrait; private $cacheDir; public function registerBundles() { return [ new FrameworkBundle(), new KnpMarkdownBundle(), ]; } protected function configureRoutes(RouteCollectionBuilder $routes) { } protected function configureContainer(ContainerBuilder $c, LoaderInterface $loader) { $c->setParameter('kernel.secret', '1234'); } public function getCacheDir() { if (null === $this->cacheDir) { $this->cacheDir = sys_get_temp_dir().'/'.rand(100, 999); } return $this->cacheDir; } }