Example #1
0
 public function testCanNotAddRepeatedEdges()
 {
     $graph = new Graph(self::UNDIRECTED_GRAPH, self::NON_WEIGHTED_GRAPH);
     $graph->addEdge('node1', 'node2');
     $graph->addEdge('node1', 'node2');
     $this->assertCount(1, $graph->getEdges('node1'));
 }