Adding tests for passed arguments with dots when parseExtensions() has been called. Refs #620

This commit is contained in:
Mark Story 2010-04-24 17:30:00 -07:00
parent e725ae10fa
commit a691edbcff

View file

@ -1572,6 +1572,22 @@ class RouterTest extends CakeTestCase {
$this->assertEqual($result['pass'][0], 'something. . .', 'Period was chopped off %s');
}
/**
* test that requests with a trailing dot don't loose the do.
*
* @return void
*/
function testParsingWithTrailingPeriodAndParseExtensions() {
Router::reload();
Router::parseExtensions('json');
$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
*