// 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;
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 = [