diff --git a/AltoRouterTest.php b/AltoRouterTest.php index 9ef9d08..0676aed 100644 --- a/AltoRouterTest.php +++ b/AltoRouterTest.php @@ -7,11 +7,7 @@ class AltoRouterDebug extends AltoRouter{ public function getNamedRoutes(){ return $this->namedRoutes; } - - public function getRoutes(){ - return $this->routes; - } - + public function getBasePath(){ return $this->basePath; } @@ -72,6 +68,20 @@ class AltoRouterTest extends PHPUnit_Framework_TestCase { } + /** + * @covers AltoRouter::getRoutes + */ + public function testGetRoutes() + { + $method = 'POST'; + $route = '/[:controller]/[:action]'; + $target = function(){}; + + $this->assertInternalType('array', $this->router->getRoutes()); + $this->router->map($method, $route, $target); + $this->assertEquals(array(array($method, $route, $target, null)), $this->router->getRoutes()); + } + /** * @covers AltoRouter::addRoutes */