Exemplo n.º 1
0
 /**
  * @covers phpDocumentor\GraphViz\Graph::getGraph
  */
 public function testGetGraph()
 {
     $mock = $this->getMock('phpDocumentor\\GraphViz\\Graph');
     $mock->expects($this->any())->method('getName')->will($this->returnValue('MyName'));
     $this->fixture->addGraph($mock);
     $this->assertSame($mock, $this->fixture->getGraph('MyName'));
 }
Exemplo n.º 2
0
 /**
  * @param string $name
  *
  * @return \phpDocumentor\GraphViz\Graph
  */
 private function getGraphByName($name)
 {
     $name = 'cluster_' . $name;
     if (!$this->graph->hasGraph($name)) {
         $graph = $this->graph->create($name);
         $this->graph->addGraph($graph);
     }
     return $this->graph->getGraph($name);
 }