class GraphvizDumperTest extends TestCase
{ protected static string
$fixturesPath;
public static function setUpBeforeClass(): void
{ self::
$fixturesPath = __DIR__.'/../Fixtures/';
} public function testDump() { $dumper =
new GraphvizDumper($container =
new ContainerBuilder());
$this->
assertStringEqualsFile(self::
$fixturesPath.'/graphviz/services1.dot',
$dumper->
dump(), '->dump() dumps an empty container as an empty dot file'
);
$container =
include self::
$fixturesPath.'/containers/container9.php';
$dumper =
new GraphvizDumper($container);
$this->
assertStringEqualsFile(self::
$fixturesPath.'/graphviz/services9.dot',
$dumper->
dump(), '->dump() dumps services'
);
$container =
include self::
$fixturesPath.'/containers/container10.php';
$dumper =
new GraphvizDumper($container);
$this->
assertStringEqualsFile(self::
$fixturesPath.'/graphviz/services10.dot',
$dumper->
dump(), '->dump() dumps services'
);