From 4174ddff0f50d3161b35bd649fbf77c8169d0c1b Mon Sep 17 00:00:00 2001 From: Kyle Robinson Young Date: Fri, 2 Dec 2011 06:19:15 -0800 Subject: [PATCH] Always set ControllerTestCase::testAction result variables --- lib/Cake/TestSuite/ControllerTestCase.php | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) diff --git a/lib/Cake/TestSuite/ControllerTestCase.php b/lib/Cake/TestSuite/ControllerTestCase.php index 4b9fbbc98..9c62c3ecd 100644 --- a/lib/Cake/TestSuite/ControllerTestCase.php +++ b/lib/Cake/TestSuite/ControllerTestCase.php @@ -263,12 +263,10 @@ abstract class ControllerTestCase extends CakeTestCase { $Dispatch->response = $this->getMock('CakeResponse', array('send')); $this->result = $Dispatch->dispatch($request, $Dispatch->response, $params); $this->controller = $Dispatch->testController; - if ($options['return'] != 'result') { - if (isset($this->controller->View)) { - $this->vars = $this->controller->View->viewVars; - $this->view = $this->controller->View->_viewNoLayout; - } - $this->contents = $this->controller->response->body(); + $this->vars = $this->controller->viewVars; + $this->contents = $this->controller->response->body(); + if (isset($this->controller->View)) { + $this->view = $this->controller->View->_viewNoLayout; } $this->__dirtyController = true; $this->headers = $Dispatch->response->header();