protected static string
$fixturesPath;
public static function setUpBeforeClass(): void
{ self::
$fixturesPath =
realpath(__DIR__.'/../Fixtures/'
);
} public function testDump() { $container =
new ContainerBuilder();
$container->
compile();
$dumper =
new PhpDumper($container);
$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(['class' => 'Container', 'base_class' => 'AbstractContainer', 'namespace' => 'Symfony\Component\DependencyInjection\Dump'
]), '->dump() takes a class and a base_class options'
);
} public function testDumpOptimizationString() { $definition =
new Definition();
$definition->
setClass('stdClass'
);
$definition->
addArgument([ 'only dot' => '.',