public function XmlFileLoaderTest::testLoad in Service Container 7
Same name and namespace in other branches
- 7.2 modules/providers/service_container_symfony/lib/Symfony/Component/DependencyInjection/Tests/Loader/XmlFileLoaderTest.php \Symfony\Component\DependencyInjection\Tests\Loader\XmlFileLoaderTest::testLoad()
File
- modules/
providers/ service_container_symfony/ lib/ Symfony/ Component/ DependencyInjection/ Tests/ Loader/ XmlFileLoaderTest.php, line 36
Class
Namespace
Symfony\Component\DependencyInjection\Tests\LoaderCode
public function testLoad() {
$loader = new XmlFileLoader(new ContainerBuilder(), new FileLocator(self::$fixturesPath . '/ini'));
try {
$loader
->load('foo.xml');
$this
->fail('->load() throws an InvalidArgumentException if the loaded file does not exist');
} catch (\Exception $e) {
$this
->assertInstanceOf('InvalidArgumentException', $e, '->load() throws an InvalidArgumentException if the loaded file does not exist');
$this
->assertStringStartsWith('The file "foo.xml" does not exist (in:', $e
->getMessage(), '->load() throws an InvalidArgumentException if the loaded file does not exist');
}
}