Skip to content

Commit

Permalink
Adding tests that show that Router is not chopping off periods from p…
Browse files Browse the repository at this point in the history
…assed arguments. Refs #620
  • Loading branch information
markstory committed Apr 29, 2010
1 parent 70b3225 commit 0800483
Showing 1 changed file with 14 additions and 0 deletions.
14 changes: 14 additions & 0 deletions cake/tests/cases/libs/router.test.php
Expand Up @@ -1558,6 +1558,20 @@ function testPagesUrlParsing() {
$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
*
Expand Down

0 comments on commit 0800483

Please sign in to comment.