/** * @param array $config * @return ContainerBuilder */ protected function getContainer($config = []) { $ext = new BabymarktExtCronExtension(); $cont = new ContainerBuilder(); $cont->setParameter('kernel.bundles', []); $cont->setParameter('kernel.root_dir', $this->rootDir); $cont->setParameter('kernel.environment', $this->environment); $ext->load([$config], $cont); return $cont; }
/** * */ public function testDoctrineDisabledConfig() { $this->extension->load([], $this->container); $this->extension->prepend($this->container); $this->assertFalse($this->container->getParameter($this->root . '.report.enabled')); $this->assertFalse($this->container->hasParameter($this->root . '.report.database.driver')); $this->assertFalse($this->container->hasParameter($this->root . '.report.database.user')); $this->assertFalse($this->container->hasParameter($this->root . '.report.database.password')); $this->assertFalse($this->container->hasParameter($this->root . '.report.database.path')); $this->assertCount(0, $this->container->getExtensionConfig('doctrine')); $this->assertNotContains($this->root . '.listener.executionreport', $this->container->getServiceIds()); }
/** * @param array $config * @return ContainerBuilder */ protected function getContainer($config = []) { $ext = new BabymarktExtCronExtension(); $cont = new ContainerBuilder(); $cont->setParameter('kernel.bundles', []); $cont->setParameter('kernel.root_dir', self::ROOT_DIR); $cont->setParameter('kernel.environment', self::ENVIRONMENT); $ext->load([$config], $cont); return $cont; }