From 9dcfcc1513ce2d001a7ad93c0ebdac0f5f3fdc4c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Michael=20Gro=C3=9Fe?= Date: Sat, 20 Feb 2021 15:42:54 +0100 Subject: [PATCH] test: run test in separate process in case of error If there is an error when executing the method under test, then this test caused the downstream test \remoteapicore_test::test_getBacklinks to unexpectedly fail. Probably, because the global plugin controller would not have been reset to its original value. Running this test in its own process ensures that it won't affect any other test, even if it messes with the global state and doesn't clean up. --- .../inc/parserutils_set_metadata_during_rendering.test.php | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/_test/tests/inc/parserutils_set_metadata_during_rendering.test.php b/_test/tests/inc/parserutils_set_metadata_during_rendering.test.php index d1018ca00..3e00acd0e 100644 --- a/_test/tests/inc/parserutils_set_metadata_during_rendering.test.php +++ b/_test/tests/inc/parserutils_set_metadata_during_rendering.test.php @@ -9,7 +9,12 @@ class parserutils_set_metadata_during_rendering_test extends DokuWikiTest // the original plugin controller private $plugin_controller; - // the actual test + /** + * the actual test + * + * @runInSeparateProcess + * @preserveGlobalState disabled + */ public function test_p_set_metadata_during_rendering() { global $EVENT_HANDLER;