mirror of
https://github.com/kamilwylegala/cakephp2-php8.git
synced 2025-01-18 18:46:17 +00:00
adding pass to the default set of router params
git-svn-id: https://svn.cakephp.org/repo/branches/1.2.x.x@5227 3807eeeb-6ff5-0310-8944-8be069107fe0
This commit is contained in:
parent
c58a7e95b9
commit
3acebbcecb
2 changed files with 4 additions and 4 deletions
|
@ -246,7 +246,7 @@ class Router extends Object {
|
|||
function parse($url) {
|
||||
$_this =& Router::getInstance();
|
||||
$_this->__connectDefaultRoutes();
|
||||
$out = array();
|
||||
$out = array('pass'=>array());
|
||||
$r = $ext = null;
|
||||
|
||||
if ($url && strpos($url, '/') !== 0) {
|
||||
|
|
|
@ -228,7 +228,7 @@ class RouterTest extends UnitTestCase {
|
|||
$this->router->parseExtensions();
|
||||
|
||||
$result = $this->router->parse('/posts.rss');
|
||||
$expected = array('controller' => 'posts', 'action' => null, 'url' => array ('ext' => 'rss'));
|
||||
$expected = array('controller' => 'posts', 'action' => null, 'url' => array ('ext' => 'rss'), 'pass'=> array());
|
||||
$this->assertEqual($result, $expected);
|
||||
|
||||
$result = $this->router->parse('/posts/view/1.rss');
|
||||
|
@ -246,11 +246,11 @@ class RouterTest extends UnitTestCase {
|
|||
$this->router->parseExtensions('rss', 'xml');
|
||||
|
||||
$result = $this->router->parse('/posts.xml');
|
||||
$expected = array('controller' => 'posts', 'action' => null, 'url' => array ('ext' => 'xml'));
|
||||
$expected = array('controller' => 'posts', 'action' => null, 'url' => array ('ext' => 'xml'), 'pass'=> array());
|
||||
$this->assertEqual($result, $expected);
|
||||
|
||||
$result = $this->router->parse('/posts.atom?hello=goodbye');
|
||||
$expected = array('controller' => 'posts.atom', 'action' => null);
|
||||
$expected = array('controller' => 'posts.atom', 'action' => null, 'pass'=> array());
|
||||
$this->assertEqual($result, $expected);
|
||||
|
||||
$this->router->reload();
|
||||
|
|
Loading…
Add table
Reference in a new issue