X-Git-Url: https://git.heureux-cyclage.org/?a=blobdiff_plain;f=tests%2Fparser%2FParserTestRunner.php;h=b40b76927eea560ecd29691664fbf7e9c9c918df;hb=36d9784b156ea4d906b73c8ae30f8ae2513e9a86;hp=699de951b6020a0744eae240fbd42db03fb86494;hpb=141f7539b6fcf2a029c8da540ac0a7a359ee6cbf;p=lhc%2Fweb%2Fwiklou.git diff --git a/tests/parser/ParserTestRunner.php b/tests/parser/ParserTestRunner.php index 699de951b6..b40b76927e 100644 --- a/tests/parser/ParserTestRunner.php +++ b/tests/parser/ParserTestRunner.php @@ -388,10 +388,10 @@ class ParserTestRunner { 100 => 'MemoryAlpha', 101 => 'MemoryAlpha_talk' ]; - // Changing wgExtraNamespaces invalidates caches in MWNamespace and - // any live Language object, both on setup and teardown + // Changing wgExtraNamespaces invalidates caches in NamespaceInfo and any live Language + // object, both on setup and teardown $reset = function () { - MWNamespace::clearCaches(); + MediaWikiServices::getInstance()->resetServiceForTesting( 'NamespaceInfo' ); MediaWikiServices::getInstance()->getContentLanguage()->resetNamespaces(); }; $setup[] = $reset; @@ -938,12 +938,7 @@ class ParserTestRunner { */ private static function getOptionValue( $key, $opts, $default ) { $key = strtolower( $key ); - - if ( isset( $opts[$key] ) ) { - return $opts[$key]; - } else { - return $default; - } + return $opts[$key] ?? $default; } /**