public function PhpDumperTest::testDump

File

drupal/core/vendor/symfony/dependency-injection/Symfony/Component/DependencyInjection/Tests/Dumper/PhpDumperTest.php, line 36

Class

PhpDumperTest

Namespace

Symfony\Component\DependencyInjection\Tests\Dumper

Code

public function testDump() {
  $dumper = new PhpDumper($container = new ContainerBuilder());
  $this
    ->assertStringEqualsFile(self::$fixturesPath . '/php/services1.php', $dumper
    ->dump(), '->dump() dumps an empty container as an empty PHP class');
  $this
    ->assertStringEqualsFile(self::$fixturesPath . '/php/services1-1.php', $dumper
    ->dump(array(
    'class' => 'Container',
    'base_class' => 'AbstractContainer',
  )), '->dump() takes a class and a base_class options');
  $container = new ContainerBuilder();
  new PhpDumper($container);
}