diff --git a/lib/Cake/Controller/Controller.php b/lib/Cake/Controller/Controller.php index 1303b7cc65a..ef3472c5437 100644 --- a/lib/Cake/Controller/Controller.php +++ b/lib/Cake/Controller/Controller.php @@ -805,6 +805,7 @@ public function set($one, $two = null) { */ public function setAction($action) { $this->request->action = $action; + $this->view = $action; $args = func_get_args(); unset($args[0]); return call_user_func_array(array(&$this, $action), $args); diff --git a/lib/Cake/Test/Case/Controller/ControllerTest.php b/lib/Cake/Test/Case/Controller/ControllerTest.php index 36f72110e88..c93079b6270 100644 --- a/lib/Cake/Test/Case/Controller/ControllerTest.php +++ b/lib/Cake/Test/Case/Controller/ControllerTest.php @@ -967,7 +967,8 @@ public function testSetAction() { $TestController = new TestController($request); $TestController->setAction('index', 1, 2); $expected = array('testId' => 1, 'test2Id' => 2); - $this->assertidentical($TestController->data, $expected); + $this->assertSame($expected, $TestController->request->data); + $this->assertSame('index', $TestController->view); } /**