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 d9f7b9b commit ba19e0af135b0752c887da056e92e59377d3b88a
Showing with 16 additions and 0 deletions.
  1. +16 −0 cake/tests/cases/libs/router.test.php
@@ -1502,6 +1502,22 @@ function testPagesUrlParsing() {
$expected = array('pass'=>array('contact'), 'named' => array(), 'plugin'=> null, 'controller'=>'pages', 'action'=>'display');
$this->assertEqual($result, $expected);
}
/**
* 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 ba19e0a

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