Skip to content
Browse files

Always set ControllerTestCase::testAction result variables

  • Loading branch information...
1 parent ff8eb2b commit 4174ddff0f50d3161b35bd649fbf77c8169d0c1b @shama shama committed
Showing with 4 additions and 6 deletions.
  1. +4 −6 lib/Cake/TestSuite/ControllerTestCase.php
View
10 lib/Cake/TestSuite/ControllerTestCase.php
@@ -263,12 +263,10 @@ protected function _testAction($url = '', $options = array()) {
$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();

0 comments on commit 4174ddf

Please sign in to comment.
Something went wrong with that request. Please try again.