reset Event System in TestRequest

To better simulate requests, event registration should be redone on each
simulated request.
This commit is contained in:
Andreas Gohr 2023-02-01 20:36:55 +01:00
parent 54a74e0562
commit d09a8e055b
1 changed files with 5 additions and 0 deletions

View File

@ -4,6 +4,7 @@
* runtime inspection.
*/
use dokuwiki\Extension\EventHandler;
use dokuwiki\Input\Input;
/**
@ -148,6 +149,10 @@ class TestRequest {
$_POST = $this->post;
$_REQUEST = array_merge($_GET, $_POST);
// reset event handler
global $EVENT_HANDLER;
$EVENT_HANDLER = new EventHandler();
// reset output buffer
$this->output_buffer = '';