You are here

public function XmlFileLoaderTest::testXmlNamespaces in Zircon Profile 8

Same name and namespace in other branches
  1. 8.0 vendor/symfony/dependency-injection/Tests/Loader/XmlFileLoaderTest.php \Symfony\Component\DependencyInjection\Tests\Loader\XmlFileLoaderTest::testXmlNamespaces()

File

vendor/symfony/dependency-injection/Tests/Loader/XmlFileLoaderTest.php, line 446

Class

XmlFileLoaderTest

Namespace

Symfony\Component\DependencyInjection\Tests\Loader

Code

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');
}