Skip to content
Permalink
Browse files

Adding tests for passed arguments with dots when parseExtensions() ha…

…s been called. Refs #620
  • Loading branch information...
markstory committed Apr 25, 2010
1 parent e725ae1 commit a691edbcffcbafa4776824409c6187a3c9db52bc
Showing with 16 additions and 0 deletions.
  1. +16 −0 cake/tests/cases/libs/router.test.php
@@ -1572,6 +1572,22 @@ function testParsingWithTrailingPeriod() {
$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
*

0 comments on commit a691edb

Please sign in to comment.
You can’t perform that action at this time.