Beispiel #1
0
 public function testAttr()
 {
     $graph = new Digraph('G');
     $graph->attr('node', array('color' => 'blue'));
     $this->assertCount(1, $instructions = $graph->getInstructions(), "Instruction count");
     $this->assertTrue($instructions[0] instanceof AttributeSet, "Instruction is an attribute set");
     $this->assertEquals("node", $instructions[0]->getName(), "Name is correct");
     $this->assertEquals("blue", $instructions[0]->getAttributes()->get('color'), "Attribute is correct");
 }