From: Platonides Date: Wed, 6 Apr 2011 21:36:07 +0000 (+0000) Subject: r85553 fixup. When there are variants involved, the line X-Git-Tag: 1.31.0-rc.0~30988 X-Git-Url: https://git.cyclocoop.org/%7B%24admin_url%7Dmembres/modifier.php?a=commitdiff_plain;h=c878cd608fb2ea8aac76c6c266fcb283db4c8716;p=lhc%2Fweb%2Fwiklou.git 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.. --- 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;