mirror of
https://github.com/kamilwylegala/cakephp2-php8.git
synced 2025-09-06 11:32:40 +00:00
Added support for final characters in multi param route elements
Fixed issue with reverse routing and falsely escaped route regex git-svn-id: https://svn.cakephp.org/repo/branches/1.2.x.x@6647 3807eeeb-6ff5-0310-8944-8be069107fe0
This commit is contained in:
parent
5be760a055
commit
4b19d4c38d
2 changed files with 16 additions and 6 deletions
|
@ -649,6 +649,13 @@ class RouterTest extends UnitTestCase {
|
|||
$result = $this->router->parse('/posts/5:sample-post-title/other/params/4');
|
||||
$expected = array('pass' => array('5', 'sample-post-title', 'other', 'params', '4'), 'named' => array(), 'id' => 5, 'url_title' => 'sample-post-title', 'plugin' => null, 'controller' => 'posts', 'action' => 'view');
|
||||
$this->assertEqual($result, $expected);
|
||||
|
||||
$this->router->reload();
|
||||
$this->router->connect('/posts/:url_title-(uuid::id)', array('controller' => 'posts', 'action' => 'view'), array('pass' => array('id', 'url_title'), 'id' => $UUID));
|
||||
$result = $this->router->parse('/posts/sample-post-title-(uuid:47fc97a9-019c-41d1-a058-1fa3cbdd56cb)');
|
||||
$expected = array('pass' => array('47fc97a9-019c-41d1-a058-1fa3cbdd56cb', 'sample-post-title'), 'named' => array(), 'id' => '47fc97a9-019c-41d1-a058-1fa3cbdd56cb', 'url_title' => 'sample-post-title', 'plugin' => null, 'controller' => 'posts', 'action' => 'view');
|
||||
$this->assertEqual($result, $expected);
|
||||
|
||||
}
|
||||
|
||||
function testUuidRoutes() {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue