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 25, 2010
1 parent ca32f0f commit c87e233
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 @@ -1518,6 +1518,20 @@ function testParsingWithTrailingPeriodAndParseExtensions() {
$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 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 c87e233

Please sign in to comment.