From b7d495cf0c1c1066c6506793aabaf1a103bf8715 Mon Sep 17 00:00:00 2001 From: Antoine Musso Date: Sun, 25 Mar 2018 15:34:05 +0200 Subject: [PATCH] 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 --- tests/parser/ParserTestRunner.php | 1 + 1 file changed, 1 insertion(+) 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(); -- 2.20.1