X-Git-Url: https://git.heureux-cyclage.org/?p=lhc%2Fweb%2Fwiklou.git;a=blobdiff_plain;f=tests%2Fphpunit%2Fbootstrap.php;h=4400475bee73d99d24b72c4fcb4de33700df37ef;hp=10348d43975822a69229de4f8c8050ca2e235050;hb=bd5a37aacf600bdd5f3a6e7998f92bd1d9326a8a;hpb=dfec83932fd38a9086eb5a2e212889ad00f35b0e diff --git a/tests/phpunit/bootstrap.php b/tests/phpunit/bootstrap.php index 10348d4397..4400475bee 100644 --- a/tests/phpunit/bootstrap.php +++ b/tests/phpunit/bootstrap.php @@ -56,6 +56,12 @@ $IP = realpath( __DIR__ . '/../../' ); // these variables must be defined before setup runs $GLOBALS['IP'] = $IP; +// Set bootstrap globals to reuse in MediaWikiUnitTestCase +$bootstrapGlobals = []; +foreach ( $GLOBALS as $key => $value ) { + $bootstrapGlobals[ $key ] = $value; +} +$GLOBALS['wgPhpUnitBootstrapGlobals'] = $bootstrapGlobals; // Faking for Setup.php $GLOBALS['wgScopeTest'] = 'MediaWiki Setup.php scope test'; $GLOBALS['wgCommandLineMode'] = true; @@ -67,6 +73,7 @@ wfRequireOnceInGlobalScope( "$IP/includes/AutoLoader.php" ); wfRequireOnceInGlobalScope( "$IP/tests/common/TestsAutoLoader.php" ); wfRequireOnceInGlobalScope( "$IP/includes/Defines.php" ); wfRequireOnceInGlobalScope( "$IP/includes/DefaultSettings.php" ); +wfRequireOnceInGlobalScope( "$IP/includes/GlobalFunctions.php" ); // Load extensions/skins present in filesystem so that classes can be discovered. $directoryToJsonMap = [