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.
This commit is contained in:
Michael Große 2021-02-20 15:42:54 +01:00
parent e855b7ed6a
commit 9dcfcc1513
No known key found for this signature in database
GPG Key ID: BDD834E001B99EDC
1 changed files with 6 additions and 1 deletions

View File

@ -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;