From 8853300a6ba01a4883369c08768afb7d17f59fe0 Mon Sep 17 00:00:00 2001 From: Brad Jorsch Date: Tue, 10 Apr 2018 17:05:31 -0400 Subject: [PATCH] ParserTestRunner: Reset InterwikiLookup service Otherwise earlier tests might have cached prefixes in the service and cause these tests to fail. Change-Id: Id0e6184aff8f9d7e8f32558e1de14faa0168cc1d --- tests/parser/ParserTestRunner.php | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/tests/parser/ParserTestRunner.php b/tests/parser/ParserTestRunner.php index 28335ecdde..844a43f34a 100644 --- a/tests/parser/ParserTestRunner.php +++ b/tests/parser/ParserTestRunner.php @@ -615,9 +615,13 @@ class ParserTestRunner { return false; } );// hooks::register + // Reset the service in case any other tests already cached some prefixes. + MediaWikiServices::getInstance()->resetServiceForTesting( 'InterwikiLookup' ); + return function () { // Tear down Hooks::clear( 'InterwikiLoadPrefix' ); + MediaWikiServices::getInstance()->resetServiceForTesting( 'InterwikiLookup' ); }; } -- 2.20.1