Permalink
Browse files

Fixing regression in ControllerTestCase after changes done in Request…

…HandlerComponent
  • Loading branch information...
1 parent 358d5c2 commit 3fc6d293fcd4f2584bfb63aee99e18c5beb1f757 @lorenzo lorenzo committed Nov 1, 2011
Showing with 9 additions and 0 deletions.
  1. +9 −0 lib/Cake/TestSuite/ControllerTestCase.php
@@ -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;
}

0 comments on commit 3fc6d29

Please sign in to comment.