public function testLoadImports() {
$container = new ContainerBuilder();
$resolver = new LoaderResolver(array(
new IniFileLoader($container, new FileLocator(self::$fixturesPath . '/yaml')),
new XmlFileLoader($container, new FileLocator(self::$fixturesPath . '/yaml')),
$loader = new YamlFileLoader($container, new FileLocator(self::$fixturesPath . '/yaml')),
));
$loader
->setResolver($resolver);
$loader
->load('services4.yml');
$actual = $container
->getParameterBag()
->all();
$expected = array(
'foo' => 'bar',
'values' => array(
true,
false,
),
'bar' => '%foo%',
'escape' => '@escapeme',
'foo_bar' => new Reference('foo_bar'),
'mixedcase' => array(
'MixedCaseKey' => 'value',
),
'imported_from_ini' => true,
'imported_from_xml' => true,
);
$this
->assertEquals(array_keys($expected), array_keys($actual), '->load() imports and merges imported files');
// Bad import throws no exception due to ignore_errors value.
$loader
->load('services4_bad_import.yml');
}