You are here

public function XmlDumperTest::testDumpAnonymousServices in Service Container 7.2

Same name and namespace in other branches
  1. 7 modules/providers/service_container_symfony/lib/Symfony/Component/DependencyInjection/Tests/Dumper/XmlDumperTest.php \Symfony\Component\DependencyInjection\Tests\Dumper\XmlDumperTest::testDumpAnonymousServices()

File

modules/providers/service_container_symfony/lib/Symfony/Component/DependencyInjection/Tests/Dumper/XmlDumperTest.php, line 88

Class

XmlDumperTest

Namespace

Symfony\Component\DependencyInjection\Tests\Dumper

Code

public function testDumpAnonymousServices() {
  $container = (include self::$fixturesPath . '/containers/container11.php');
  $dumper = new XmlDumper($container);
  $this
    ->assertEquals('<?xml version="1.0" encoding="utf-8"?>
<container xmlns="http://symfony.com/schema/dic/services" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://symfony.com/schema/dic/services http://symfony.com/schema/dic/services/services-1.0.xsd">
  <services>
    <service id="foo" class="FooClass">
      <argument type="service">
        <service class="BarClass">
          <argument type="service">
            <service class="BazClass"/>
          </argument>
        </service>
      </argument>
    </service>
  </services>
</container>
', $dumper
    ->dump());
}