mirror of
https://github.com/kamilwylegala/cakephp2-php8.git
synced 2024-11-15 03:18:26 +00:00
Merge pull request #8497 from cakephp/issue-8480
Clear the router state after testAction().
This commit is contained in:
commit
099369b94c
1 changed files with 4 additions and 0 deletions
|
@ -278,6 +278,10 @@ abstract class ControllerTestCase extends CakeTestCase {
|
|||
$Dispatch->testController = $this->controller;
|
||||
$Dispatch->response = $this->getMock('CakeResponse', array('send', '_clearBuffer'));
|
||||
$this->result = $Dispatch->dispatch($request, $Dispatch->response, $params);
|
||||
|
||||
// Clear out any stored requests.
|
||||
Router::reload();
|
||||
|
||||
$this->controller = $Dispatch->testController;
|
||||
$this->vars = $this->controller->viewVars;
|
||||
$this->contents = $this->controller->response->body();
|
||||
|
|
Loading…
Reference in a new issue