/** * @param $configFile * @param Container|NULL $bootstrapContainer * @return Container */ private function createContainer($configFile, Container $bootstrapContainer = NULL) { $factory = new ContainerFactory(); $factory->addConfig($this->workingDir . '/' . $configFile); if (is_file($this->workingDir . '/config.local.neon')) { $factory->addConfig($this->workingDir . '/config.local.neon'); } $factory->setWorkingDirectory($this->workingDir); if ($bootstrapContainer !== NULL) { $factory->addContainerToMerge($bootstrapContainer); } return $factory->create(); }
/** * @expectedException \Genesis\NotSupportedException * @expectedExceptionMessage Since version 2.0 are supported main only these sections */ public function testOld1xConfig() { $workingDir = __DIR__ . '/02'; $factory = new ContainerFactory(); $factory->setWorkingDirectory($workingDir); $factory->addConfig(__DIR__ . '/02/config-old1x.neon'); $factory->create(); }