Browse files

Adding tests that show that Router is not chopping off periods from p…

…assed arguments. Refs #620
  • Loading branch information...
1 parent ca32f0f commit c87e233500f7807a772896f093f2616a4f276650 @markstory markstory committed Apr 24, 2010
Showing with 14 additions and 0 deletions.
  1. +14 −0 cake/tests/cases/libs/router.test.php
View
14 cake/tests/cases/libs/router.test.php
@@ -1519,6 +1519,20 @@ function testParsingWithTrailingPeriodAndParseExtensions() {
}
/**
+ * 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
*
* @access public

0 comments on commit c87e233

Please sign in to comment.