diff --git a/cake/tests/cases/libs/route/cake_route.test.php b/cake/tests/cases/libs/route/cake_route.test.php index 5e6860fba..3107e0084 100644 --- a/cake/tests/cases/libs/route/cake_route.test.php +++ b/cake/tests/cases/libs/route/cake_route.test.php @@ -496,4 +496,16 @@ class CakeRouteTestCase extends CakeTestCase { $expected = '/posts/index/?test=value&other=value'; $this->assertEquals($expected, $result); } + +/** + * test that querystring params work with non greedy routes. + * + * @return void + */ + function testQueryStringNonGreedy() { + $route = new CakeRoute('/:controller/:action'); + $result = $route->match(array('controller' => 'posts', 'action' => 'index', '?test' => 'value')); + $expected = '/posts/index?test=value'; + $this->assertEquals($expected, $result); + } } \ No newline at end of file