/** * Tests whether the magic __toString method returns a well formatted string * as specified in the DOT standard when the label contains slashes. * * @covers phpDocumentor\GraphViz\Node::__toString */ public function testToStringWithLabelContainingSlashes() { $this->fixture->setfontsize(12); $this->fixture->setfontname('Bitstream Vera Sans'); $this->fixture->setLabel('\\phpDocumentor\\Descriptor\\ProjectDescriptor'); $dot = <<<DOT "name" [ label="\\\\phpDocumentor\\\\Descriptor\\\\ProjectDescriptor" fontsize="12" fontname="Bitstream Vera Sans" ] DOT; $this->assertSame($dot, (string) $this->fixture); }