diff --git a/lib/Cake/Test/TestCase/Routing/DispatcherTest.php b/lib/Cake/Test/TestCase/Routing/DispatcherTest.php index 9d5ab890c42..438e56b3409 100644 --- a/lib/Cake/Test/TestCase/Routing/DispatcherTest.php +++ b/lib/Cake/Test/TestCase/Routing/DispatcherTest.php @@ -437,7 +437,7 @@ public function testDispatchBasic() { $this->assertEquals($expected, $Dispatcher->controller->name); $expected = array('0' => 'home'); - $this->assertSame($expected, $controller->request->params['pass']); + $this->assertSame($expected, $Dispatcher->controller->request->params['pass']); Configure::write('App.baseUrl', '/pages/index.php'); @@ -687,7 +687,7 @@ public function testDispatcherFilterCallable() { $response = $this->getMock('Cake\Network\Response', array('send')); $dispatcher->dispatch($request, $response); $this->assertEmpty($dispatcher->controller); - $expected = array('controller' => null, 'action' => null, 'plugin' => null, 'named' => array(), 'pass' => array()); + $expected = array('controller' => null, 'action' => null, 'plugin' => null, 'pass' => array()); $this->assertEquals($expected, $request->params); $dispatcher = new TestDispatcher(); diff --git a/lib/Cake/Test/TestCase/View/Helper/PrototypeEngineHelperTest.php b/lib/Cake/Test/TestCase/View/Helper/PrototypeEngineHelperTest.php index d78c9f48749..13191bd4339 100644 --- a/lib/Cake/Test/TestCase/View/Helper/PrototypeEngineHelperTest.php +++ b/lib/Cake/Test/TestCase/View/Helper/PrototypeEngineHelperTest.php @@ -18,6 +18,7 @@ namespace Cake\Test\TestCase\View\Helper; use Cake\TestSuite\TestCase; +use Cake\Routing\Router; use Cake\View\Helper\HtmlHelper; use Cake\View\Helper\JsHelper; use Cake\View\Helper\PrototypeEngineHelper; @@ -183,6 +184,8 @@ public function testEffect() { * @return void */ public function testRequest() { + Router::connect('/:controller/:action/*'); + $result = $this->Proto->request(array('controller' => 'posts', 'action' => 'view', 1)); $expected = 'var jsRequest = new Ajax.Request("/posts/view/1");'; $this->assertEquals($expected, $result); diff --git a/lib/Cake/Test/TestCase/View/HelperTest.php b/lib/Cake/Test/TestCase/View/HelperTest.php index 5cc013049b8..4ef39b3b178 100644 --- a/lib/Cake/Test/TestCase/View/HelperTest.php +++ b/lib/Cake/Test/TestCase/View/HelperTest.php @@ -17,6 +17,7 @@ * @license MIT License (http://www.opensource.org/licenses/mit-license.php) */ namespace Cake\Test\TestCase\View; + use Cake\Core\App; use Cake\Core\Configure; use Cake\Core\Plugin; @@ -609,6 +610,8 @@ public function testAssetTimestamp() { * @return void */ public function testAssetUrl() { + Router::connect('/:controller/:action/*'); + $this->Helper->webroot = ''; $result = $this->Helper->assetUrl(array( 'controller' => 'js',