diff --git a/tests/AltoRouterTest.php b/tests/AltoRouterTest.php index 0676aed..6103e67 100644 --- a/tests/AltoRouterTest.php +++ b/tests/AltoRouterTest.php @@ -273,6 +273,20 @@ public function testMatch() ), $this->router->match('/foo/test/do?param=value', 'GET')); } + + public function testMatchWithNonRegex() { + $this->router->map('GET','/about-us', 'PagesController#about', 'about_us'); + + $this->assertEquals(array( + 'target' => 'PagesController#about', + 'params' => array(), + 'name' => 'about_us' + ), $this->router->match('/about-us', 'GET')); + + $this->assertFalse($this->router->match('/about-us', 'POST')); + $this->assertFalse($this->router->match('/about', 'GET')); + $this->assertFalse($this->router->match('/about-us-again', 'GET')); + } public function testMatchWithFixedParamValues() {