X-Git-Url: https://git.heureux-cyclage.org/?a=blobdiff_plain;f=tests%2Fphpunit%2Fbootstrap.php;h=477dbd298eec301df505af066e098685a361739c;hb=371f758d9ef456a5664c0d1247b4d18174a03f02;hp=9e79496ac5ad10cef2d9e4b523240bd2fd2376dc;hpb=35243c574fa96b447d1683a9cae234ec7958d611;p=lhc%2Fweb%2Fwiklou.git diff --git a/tests/phpunit/bootstrap.php b/tests/phpunit/bootstrap.php index 9e79496ac5..477dbd298e 100644 --- a/tests/phpunit/bootstrap.php +++ b/tests/phpunit/bootstrap.php @@ -55,19 +55,15 @@ define( 'MW_CONFIG_FILE', "$IP/LocalSettings.php" ); // 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 + +require_once "$IP/tests/common/TestSetup.php"; +TestSetup::snapshotGlobals(); + +// Faking in lieu of Setup.php $GLOBALS['wgScopeTest'] = 'MediaWiki Setup.php scope test'; $GLOBALS['wgCommandLineMode'] = true; $GLOBALS['wgAutoloadClasses'] = []; -require_once "$IP/tests/common/TestSetup.php"; - wfRequireOnceInGlobalScope( "$IP/includes/AutoLoader.php" ); wfRequireOnceInGlobalScope( "$IP/tests/common/TestsAutoLoader.php" ); wfRequireOnceInGlobalScope( "$IP/includes/Defines.php" );