Added another test for querystring params. Querystring params should not be affected by greedy routes, as they are not really controlled by internal routing.

This commit is contained in:
mark_story 2010-12-18 16:51:54 -05:00
parent eb9fe07472
commit 319e622151

View file

@ -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);
}
}