Permalink
Browse files

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

…assed arguments. Refs #620
  • Loading branch information...
1 parent 56967e7 commit 5f03862f25ea7e8fbb711a76db56ae5874aa92cb @markstory markstory committed Apr 24, 2010
Showing with 14 additions and 0 deletions.
  1. +14 −0 cake/tests/cases/libs/router.test.php
@@ -1665,6 +1665,20 @@ function testPagesUrlParsing() {
}
/**
+ * 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 5f03862

Please sign in to comment.