+ /**
+ * Whitelist of globals to allow in MediaWikiUnitTestCase.
+ *
+ * Please, keep this list to the bare minimum.
+ *
+ * @return string[]
+ */
+ private static function getGlobalsWhitelist() {
+ return [
+ // The autoloader may change between bootstrap and the first test,
+ // so (lazily) capture these here instead.
+ 'wgAutoloadClasses',
+ 'wgAutoloadLocalClasses',
+ // Need for LoggerFactory. Default is NullSpi.
+ 'wgMWLoggerDefaultSpi',
+ 'wgAutoloadAttemptLowercase'
+ ];
+ }
+