mirror of
https://github.com/kamilwylegala/cakephp2-php8.git
synced 2024-11-15 03:18:26 +00:00
Fixing regression in ControllerTestCase after changes done in RequestHandlerComponent
This commit is contained in:
parent
358d5c213c
commit
3fc6d293fc
1 changed files with 9 additions and 0 deletions
|
@ -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;
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue