Follow-up r85403: fix fatal in parser tests.
authorHappy-melon <happy-melon@users.mediawiki.org>
Wed, 6 Apr 2011 17:39:18 +0000 (17:39 +0000)
committerHappy-melon <happy-melon@users.mediawiki.org>
Wed, 6 Apr 2011 17:39:18 +0000 (17:39 +0000)
tests/parser/parserTest.inc
tests/phpunit/includes/parser/NewParserTest.php

index 02767b3..680137e 100644 (file)
@@ -680,6 +680,9 @@ class ParserTest {
                        $GLOBALS[$var] = $val;
                }
 
+               $langObj = Language::factory( $lang );
+               $GLOBALS['wgContLang'] = $langObj;
+
                $context = new RequestContext();
                $GLOBALS['wgLang'] = $context->lang;
                $GLOBALS['wgContLang'] = $context->lang;
index a52ab1e..5400f56 100644 (file)
@@ -295,6 +295,9 @@ class NewParserTest extends MediaWikiTestCase {
                        $GLOBALS[$var] = $val;
                }
 
+               $langObj = Language::factory( $lang );
+               $GLOBALS['wgContLang'] = $langObj;
+
                $context = new RequestContext();
                $GLOBALS['wgLang'] = $context->lang;
                $GLOBALS['wgContLang'] = $context->lang;