Skip to content

Commit

Permalink
Added another test for querystring params. Querystring params should …
Browse files Browse the repository at this point in the history
…not be affected by greedy routes, as they are not really controlled by internal routing.
  • Loading branch information
markstory committed Dec 18, 2010
1 parent eb9fe07 commit 319e622
Showing 1 changed file with 12 additions and 0 deletions.
12 changes: 12 additions & 0 deletions cake/tests/cases/libs/route/cake_route.test.php
Original file line number Diff line number Diff line change
Expand Up @@ -496,4 +496,16 @@ function testQueryStringParams() {
$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);
}
}

0 comments on commit 319e622

Please sign in to comment.