From 3fc6d293fcd4f2584bfb63aee99e18c5beb1f757 Mon Sep 17 00:00:00 2001 From: Jose Lorenzo Rodriguez Date: Tue, 1 Nov 2011 13:49:40 -0430 Subject: [PATCH] Fixing regression in ControllerTestCase after changes done in RequestHandlerComponent --- lib/Cake/TestSuite/ControllerTestCase.php | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/lib/Cake/TestSuite/ControllerTestCase.php b/lib/Cake/TestSuite/ControllerTestCase.php index 7bebd7695..a015b1728 100644 --- a/lib/Cake/TestSuite/ControllerTestCase.php +++ b/lib/Cake/TestSuite/ControllerTestCase.php @@ -59,6 +59,15 @@ class ControllerTestDispatcher extends Dispatcher { $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; }