Browse files

Ooooops, when solving non-existing paths the system encounters an

error, highlighted by the test, so we are able to fix our code.
  • Loading branch information...
1 parent dc7defc commit 8c69745d40e9caf79d8cab3c9432a1dc8e522775 @odino committed Nov 18, 2011
Showing with 6 additions and 2 deletions.
  1. +6 −2 tests/DijkstraTest.php
View
8 tests/DijkstraTest.php
@@ -26,7 +26,7 @@ class DijkstraTest extends PHPUnit_Framework_TestCase
/**
* @dataProvider provider
*/
- public function testSolvingTheAlgorithm(array $path, $algorithm)
+ public function testSolvingTheAlgorithm($path, $algorithm)
{
$this->assertEquals($path, $algorithm->solve());
}
@@ -70,9 +70,13 @@ public function provider()
$set2 = array(
array($bengaluru, $goa, $pune), new Dijkstra($bengaluru, $pune),
);
+
+ $set3 = array(
+ null, new Dijkstra($pune, $bengaluru),
+ );
return array(
- $set1, $set2
+ $set1, $set2, $set3
);
}
}

0 comments on commit 8c69745

Please sign in to comment.