mirror of
https://github.com/kamilwylegala/cakephp2-php8.git
synced 2024-11-15 11:28:25 +00:00
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:
parent
eb9fe07472
commit
319e622151
1 changed files with 12 additions and 0 deletions
|
@ -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);
|
||||
}
|
||||
}
|
Loading…
Reference in a new issue