mirror of
https://github.com/kamilwylegala/cakephp2-php8.git
synced 2025-01-19 02:56:15 +00:00
Updating fatal tests in Dispatcher tests. Updating Router to use a method instead of a raw array_merge.
This commit is contained in:
parent
0a7ba707b6
commit
2b08ad6012
2 changed files with 5 additions and 6 deletions
|
@ -486,8 +486,7 @@ class Router {
|
|||
$out['url']['ext'] = $ext;
|
||||
}
|
||||
|
||||
$request->params = array_merge($request->params, $out);
|
||||
|
||||
$request->addParams($out);
|
||||
return $request;
|
||||
}
|
||||
|
||||
|
|
|
@ -679,16 +679,16 @@ class DispatcherTest extends CakeTestCase {
|
|||
Router::connect('/pages/*', array('controller' => 'pages', 'action' => 'display'));
|
||||
|
||||
$_GET = array('coffee' => 'life', 'sleep' => 'sissies');
|
||||
$Dispatcher =& new Dispatcher();
|
||||
$uri = 'posts/home/?coffee=life&sleep=sissies';
|
||||
$Dispatcher = new Dispatcher();
|
||||
$uri = new CakeRequest('posts/home/?coffee=life&sleep=sissies');
|
||||
$result = $Dispatcher->parseParams($uri);
|
||||
$this->assertPattern('/posts/', $result['controller']);
|
||||
$this->assertPattern('/home/', $result['action']);
|
||||
$this->assertTrue(isset($result['url']['sleep']));
|
||||
$this->assertTrue(isset($result['url']['coffee']));
|
||||
|
||||
$Dispatcher =& new Dispatcher();
|
||||
$uri = '/?coffee=life&sleep=sissy';
|
||||
$Dispatcher = new Dispatcher();
|
||||
$uri = new CakeRequest('/?coffee=life&sleep=sissy');
|
||||
$result = $Dispatcher->parseParams($uri);
|
||||
$this->assertPattern('/pages/', $result['controller']);
|
||||
$this->assertPattern('/display/', $result['action']);
|
||||
|
|
Loading…
Add table
Reference in a new issue