public function testEscaping() { $graph = new Graph(); $graph->createVertex('a'); $graph->createVertex('b¹²³ is; ok\\ay, "right"?'); $graph->createVertex(3); $graph->createVertex(4)->setAttribute('graphviz.label', 'normal'); $graph->createVertex(5)->setAttribute('graphviz.label', GraphViz::raw('<raw>')); $expected = <<<VIZ graph G { "a" "b¹²³ is; ok\\\\ay, "right"?" 3 4 [label="normal"] 5 [label=<raw>] } VIZ; $this->assertEquals($expected, $this->graphViz->createScript($graph)); }