Пример #1
0
 public function testExporterGetSet()
 {
     $graph = new Graph();
     $exporter = $graph->getExporter();
     $this->assertInstanceOf('Fhaculty\\Graph\\Exporter\\ExporterInterface', $exporter);
     // multiple calls should return the same exporter
     $this->assertSame($exporter, $graph->getExporter());
     $graph->setExporter($exporter);
 }
Пример #2
0
 /**
  * @return string
  */
 public function __toString()
 {
     $exporter = new Dot();
     $this->graph->setExporter($exporter);
     return (string) $this->graph;
 }