From: Antoine Musso Date: Sun, 25 Mar 2018 13:34:05 +0000 (+0200) Subject: ParserTest: clear Language namespaces cache X-Git-Tag: 1.31.0-rc.0~288^2 X-Git-Url: http://git.cyclocoop.org/%7B%24www_url%7Dadmin/compta/operations/?a=commitdiff_plain;h=b7d495cf0c1c1066c6506793aabaf1a103bf8715;p=lhc%2Fweb%2Fwiklou.git ParserTest: clear Language namespaces cache The content language object has a cache for namespaces, it might then not take in account $wgExtraNamespaces set by the parser test suite which causes unknown namespaces errors. Ensure the new language object has a clean cache. Repro: php phpunit.php --filter '(ParserMethodsTest::testValidCovers|T53680)' Bug: T190554 Change-Id: I9c4104d7bb3a0c84b60d7e7b4154743cbe58348c --- diff --git a/tests/parser/ParserTestRunner.php b/tests/parser/ParserTestRunner.php index f0c815f8ca..28335ecdde 100644 --- a/tests/parser/ParserTestRunner.php +++ b/tests/parser/ParserTestRunner.php @@ -1108,6 +1108,7 @@ class ParserTestRunner { // Set content language. This invalidates the magic word cache and title services $lang = Language::factory( $langCode ); + $lang->resetNamespaces(); $setup['wgContLang'] = $lang; $reset = function () { MagicWord::clearCache();