Merge "Title: Title::getSubpage should not lose the interwiki prefix"
[lhc/web/wiklou.git] / tests / phpunit / MediaWikiUnitTestCase.php
index 3f0fc7a..43a333c 100644 (file)
@@ -44,8 +44,8 @@ abstract class MediaWikiUnitTestCase extends TestCase {
                $GLOBALS = [];
                // Add back the minimal set of globals needed for unit tests to run for core +
                // extensions/skins.
-               foreach ( [ 'wgAutoloadClasses', 'wgAutoloadLocalClasses', 'IP' ] as $requiredGlobal ) {
-                       $GLOBALS[$requiredGlobal] = $this->unitGlobals[ $requiredGlobal ];
+               foreach ( $this->unitGlobals['wgPhpUnitBootstrapGlobals'] ?? [] as $key => $value ) {
+                       $GLOBALS[ $key ] = $this->unitGlobals[ $key ];
                }
        }