mirror of
https://github.com/kamilwylegala/cakephp2-php8.git
synced 2025-01-19 02:56:15 +00:00
Merge pull request #350 from shama/patch-controller-test-case
Always set ControllerTestCase::testAction result variables
This commit is contained in:
commit
f58d28abd4
1 changed files with 4 additions and 6 deletions
|
@ -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();
|
||||
|
|
Loading…
Add table
Reference in a new issue