public function testConstructionFullParams() { $params = $params = array('env' => 'prod', 'debug' => false, 'root_dir' => $this->getRootDir(), 'bundles' => array(new Bundle1(), new Bundle2()), 'container_configurator' => function () { }); $kernel = new SymfonyConfigurableKernel($params); $this->assertSame('prod', $kernel->getEnvironment()); $this->assertFalse($kernel->isDebug()); $this->assertSame($params['bundles'], $kernel->registerBundles()); $this->assertSame(array(), $kernel->getBundles()); $this->assertSame($params['root_dir'], $kernel->getRootDir()); $kernel->boot(); }
public function __construct(array $params) { $this->params = f\fill_validating_or_throw($params, SymfonyConfigurableKernel::paramRules()); }