Skip to content

Commit

Permalink
Fixing regression in ControllerTestCase after changes done in Request…
Browse files Browse the repository at this point in the history
…HandlerComponent
  • Loading branch information
lorenzo committed Nov 1, 2011
1 parent 358d5c2 commit 3fc6d29
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions lib/Cake/TestSuite/ControllerTestCase.php
Expand Up @@ -59,6 +59,15 @@ function _getController($request, $response) {
$this->testController->helpers = array_merge(array('InterceptContent'), $this->testController->helpers);
$this->testController->setRequest($request);
$this->testController->response = $this->response;
foreach ($this->testController->Components->attached() as $component) {
$object = $this->testController->Components->{$component};
if (isset($object->response)) {
$object->response = $response;
}
}
if (isset($object->request)) {
$object->request = $request;
}
return $this->testController;
}

Expand Down

0 comments on commit 3fc6d29

Please sign in to comment.