Always set ControllerTestCase::testAction result variables

This commit is contained in:
Kyle Robinson Young 2011-12-02 06:19:15 -08:00
parent ff8eb2bcca
commit 4174ddff0f

View file

@ -263,12 +263,10 @@ abstract class ControllerTestCase extends CakeTestCase {
$Dispatch->response = $this->getMock('CakeResponse', array('send')); $Dispatch->response = $this->getMock('CakeResponse', array('send'));
$this->result = $Dispatch->dispatch($request, $Dispatch->response, $params); $this->result = $Dispatch->dispatch($request, $Dispatch->response, $params);
$this->controller = $Dispatch->testController; $this->controller = $Dispatch->testController;
if ($options['return'] != 'result') { $this->vars = $this->controller->viewVars;
if (isset($this->controller->View)) { $this->contents = $this->controller->response->body();
$this->vars = $this->controller->View->viewVars; if (isset($this->controller->View)) {
$this->view = $this->controller->View->_viewNoLayout; $this->view = $this->controller->View->_viewNoLayout;
}
$this->contents = $this->controller->response->body();
} }
$this->__dirtyController = true; $this->__dirtyController = true;
$this->headers = $Dispatch->response->header(); $this->headers = $Dispatch->response->header();