From: Happy-melon Date: Wed, 6 Apr 2011 17:39:18 +0000 (+0000) Subject: Follow-up r85403: fix fatal in parser tests. X-Git-Tag: 1.31.0-rc.0~30997 X-Git-Url: http://git.heureux-cyclage.org/?a=commitdiff_plain;h=f121f8967499f3ab0412f87c413ad6b7e566ed07;p=lhc%2Fweb%2Fwiklou.git Follow-up r85403: fix fatal in parser tests. --- diff --git a/tests/parser/parserTest.inc b/tests/parser/parserTest.inc index 02767b3020..680137ea3f 100644 --- a/tests/parser/parserTest.inc +++ b/tests/parser/parserTest.inc @@ -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; diff --git a/tests/phpunit/includes/parser/NewParserTest.php b/tests/phpunit/includes/parser/NewParserTest.php index a52ab1e276..5400f56a33 100644 --- a/tests/phpunit/includes/parser/NewParserTest.php +++ b/tests/phpunit/includes/parser/NewParserTest.php @@ -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;