mirror of
https://github.com/kamilwylegala/cakephp2-php8.git
synced 2025-01-19 11:06:15 +00:00
parent
cd7438d33d
commit
f0f1531fac
1 changed files with 17 additions and 0 deletions
|
@ -996,6 +996,23 @@ class RouterTest extends CakeTestCase {
|
||||||
$this->assertEquals('/admin/other/posts/index', $result);
|
$this->assertEquals('/admin/other/posts/index', $result);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Test that URL's fail to parse when they are prefixed with //
|
||||||
|
*
|
||||||
|
* @return void
|
||||||
|
*/
|
||||||
|
public function testUrlParseFailureDoubleSlash() {
|
||||||
|
Router::connect('/posts', array('controller' => 'posts', 'action' => 'index'));
|
||||||
|
$result = Router::parse('/posts');
|
||||||
|
$this->assertEquals(
|
||||||
|
array('pass' => array(), 'named' => array(), 'plugin' => null, 'controller' => 'posts', 'action' => 'index'),
|
||||||
|
$result
|
||||||
|
);
|
||||||
|
|
||||||
|
$result = Router::parse('//posts');
|
||||||
|
$this->assertEquals(array(), $result);
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* testUrlParsing method
|
* testUrlParsing method
|
||||||
*
|
*
|
||||||
|
|
Loading…
Add table
Reference in a new issue