Adding tests that show that Router is not chopping off periods from passed arguments. Refs #620

This commit is contained in:
Mark Story 2010-04-24 10:40:15 -07:00
parent 70b3225ff0
commit 0800483407

View file

@ -1558,6 +1558,20 @@ class RouterTest extends CakeTestCase {
$this->assertEqual($result, $expected);
}
/**
* test that requests with a trailing dot don't loose the do.
*
* @return void
*/
function testParsingWithTrailingPeriod() {
Router::reload();
$result = Router::parse('/posts/view/something.');
$this->assertEqual($result['pass'][0], 'something.', 'Period was chopped off %s');
$result = Router::parse('/posts/view/something. . .');
$this->assertEqual($result['pass'][0], 'something. . .', 'Period was chopped off %s');
}
/**
* testParsingWithPrefixes method
*