You are here

public function PhpDumperTest::testDump in Zircon Profile 8

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

File

vendor/symfony/dependency-injection/Tests/Dumper/PhpDumperTest.php, line 29

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',
    'namespace' => 'Symfony\\Component\\DependencyInjection\\Dump',
  )), '->dump() takes a class and a base_class options');
  $container = new ContainerBuilder();
  new PhpDumper($container);
}