EdgeUndirectedTest.php 586 B

123456789101112131415161718192021222324
  1. <?php
  2. class EdgeUndirectedTest extends EdgeBaseTest
  3. {
  4. protected function createEdge()
  5. {
  6. // 1 -- 2
  7. return $this->v1->createEdge($this->v2);
  8. }
  9. protected function createEdgeLoop()
  10. {
  11. // 1 --\
  12. // | |
  13. // \---/
  14. return $this->v1->createEdge($this->v1);
  15. }
  16. public function testVerticesEnds()
  17. {
  18. $this->assertEquals(array($this->v1, $this->v2), $this->edge->getVerticesStart()->getVector());
  19. $this->assertEquals(array($this->v2, $this->v1), $this->edge->getVerticesTarget()->getVector());
  20. }
  21. }