mirror of
https://github.com/kamilwylegala/cakephp2-php8.git
synced 2025-01-18 18:46:17 +00:00
Instead of wiping the Router, just clear requests.
Clearing the router also removes routes which can cause assertions to fail. By just removing the stored requests we avoid the error reported in #8480 and not break as many tests.
This commit is contained in:
parent
099369b94c
commit
c6db76d044
1 changed files with 3 additions and 1 deletions
|
@ -280,7 +280,9 @@ abstract class ControllerTestCase extends CakeTestCase {
|
|||
$this->result = $Dispatch->dispatch($request, $Dispatch->response, $params);
|
||||
|
||||
// Clear out any stored requests.
|
||||
Router::reload();
|
||||
while (Router::getRequest()) {
|
||||
Router::popRequest();
|
||||
}
|
||||
|
||||
$this->controller = $Dispatch->testController;
|
||||
$this->vars = $this->controller->viewVars;
|
||||
|
|
Loading…
Add table
Reference in a new issue