mirror of
https://github.com/kamilwylegala/cakephp2-php8.git
synced 2025-02-07 20:46:24 +00:00
Adding tests for passed arguments with dots when parseExtensions() has been called. Refs #620
This commit is contained in:
parent
e725ae10fa
commit
a691edbcff
1 changed files with 16 additions and 0 deletions
|
@ -1572,6 +1572,22 @@ class RouterTest extends CakeTestCase {
|
||||||
$this->assertEqual($result['pass'][0], 'something. . .', 'Period was chopped off %s');
|
$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 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
|
* testParsingWithPrefixes method
|
||||||
*
|
*
|
||||||
|
|
Loading…
Add table
Reference in a new issue