public function XmlFileLoaderTest::testXmlNamespaces in Service Container 7.2
Same name and namespace in other branches
- 7 modules/providers/service_container_symfony/lib/Symfony/Component/DependencyInjection/Tests/Loader/XmlFileLoaderTest.php \Symfony\Component\DependencyInjection\Tests\Loader\XmlFileLoaderTest::testXmlNamespaces()
File
- modules/
providers/ service_container_symfony/ lib/ Symfony/ Component/ DependencyInjection/ Tests/ Loader/ XmlFileLoaderTest.php, line 448
Class
Namespace
Symfony\Component\DependencyInjection\Tests\LoaderCode
public function testXmlNamespaces() {
$container = new ContainerBuilder();
$loader = new XmlFileLoader($container, new FileLocator(self::$fixturesPath . '/xml'));
$loader
->load('namespaces.xml');
$services = $container
->getDefinitions();
$this
->assertTrue(isset($services['foo']), '->load() parses <srv:service> elements');
$this
->assertEquals(1, count($services['foo']
->getTag('foo.tag')), '->load parses <srv:tag> elements');
$this
->assertEquals(array(
array(
'setBar',
array(
'foo',
),
),
), $services['foo']
->getMethodCalls(), '->load() parses the <srv:call> tag');
}