From c878cd608fb2ea8aac76c6c266fcb283db4c8716 Mon Sep 17 00:00:00 2001 From: Platonides Date: Wed, 6 Apr 2011 21:36:07 +0000 Subject: [PATCH] r85553 fixup. When there are variants involved, the line $GLOBALS['wgContLang'] = $context->lang; is not assigning $wgContLang the same $langObj instantiated a couple of lines above, but a different object obtained from the user code, breaking variant parsertestsw.. --- tests/parser/parserTest.inc | 5 ++--- tests/phpunit/includes/parser/NewParserTest.php | 3 +-- 2 files changed, 3 insertions(+), 5 deletions(-) diff --git a/tests/parser/parserTest.inc b/tests/parser/parserTest.inc index 680137ea3f..58f0b29507 100644 --- a/tests/parser/parserTest.inc +++ b/tests/parser/parserTest.inc @@ -682,10 +682,9 @@ class ParserTest { $langObj = Language::factory( $lang ); $GLOBALS['wgContLang'] = $langObj; - $context = new RequestContext(); - $GLOBALS['wgLang'] = $context->lang; - $GLOBALS['wgContLang'] = $context->lang; + $GLOBALS['wgLang'] = $context->getLang(); + $GLOBALS['wgMemc'] = new EmptyBagOStuff; $GLOBALS['wgOut'] = new $context->output; diff --git a/tests/phpunit/includes/parser/NewParserTest.php b/tests/phpunit/includes/parser/NewParserTest.php index 5400f56a33..8a2c7d1c17 100644 --- a/tests/phpunit/includes/parser/NewParserTest.php +++ b/tests/phpunit/includes/parser/NewParserTest.php @@ -297,10 +297,9 @@ class NewParserTest extends MediaWikiTestCase { $langObj = Language::factory( $lang ); $GLOBALS['wgContLang'] = $langObj; - $context = new RequestContext(); $GLOBALS['wgLang'] = $context->lang; - $GLOBALS['wgContLang'] = $context->lang; + $GLOBALS['wgMemc'] = new EmptyBagOStuff; $GLOBALS['wgOut'] = new $context->output; -- 2.20.1