r85553 fixup. When there are variants involved, the line
authorPlatonides <platonides@users.mediawiki.org>
Wed, 6 Apr 2011 21:36:07 +0000 (21:36 +0000)
committerPlatonides <platonides@users.mediawiki.org>
Wed, 6 Apr 2011 21:36:07 +0000 (21:36 +0000)
$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
tests/phpunit/includes/parser/NewParserTest.php

index 680137e..58f0b29 100644 (file)
@@ -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;
 
index 5400f56..8a2c7d1 100644 (file)
@@ -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;