new PhpFileLoader($this->container,
$locator),
new IniFileLoader($this->container,
$locator),
new YamlFileLoader($this->container,
$locator),
$this->loader,
]);
$this->loader->
setResolver($resolver);
} public function testDirectoryCanBeLoadedRecursively() { $this->loader->
load('directory/'
);
$this->
assertEquals(['ini' => 'ini', 'yaml' => 'yaml', 'php' => 'php'
],
$this->container->
getParameterBag()->
all(), '->load() takes a single directory'
);
} public function testImports() { $this->loader->
resolve('directory/import/import.yml'
)->
load('directory/import/import.yml'
);
$this->
assertEquals(['ini' => 'ini', 'yaml' => 'yaml'
],
$this->container->
getParameterBag()->
all(), '->load() takes a single file that imports a directory'
);
} public function testExceptionIsRaisedWhenDirectoryDoesNotExist() { $this->
expectException(\InvalidArgumentException::
class);