From 6ed5d0209400e77c387c0031ca155b88e3b04370 Mon Sep 17 00:00:00 2001 From: Alexandre Emsenhuber Date: Wed, 25 May 2011 18:37:32 +0000 Subject: [PATCH] Also change $wgLanguageCode along with $wgContLang, this was breaking when arriving at LanguageConverterTest with "nooo!" --- tests/phpunit/includes/ExtraParserTest.php | 2 ++ tests/phpunit/includes/GlobalTest.php | 3 ++- 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/tests/phpunit/includes/ExtraParserTest.php b/tests/phpunit/includes/ExtraParserTest.php index 5bc2221673..54f2915d5c 100644 --- a/tests/phpunit/includes/ExtraParserTest.php +++ b/tests/phpunit/includes/ExtraParserTest.php @@ -9,8 +9,10 @@ class ExtraParserTest extends MediaWikiTestCase { global $wgMemc; global $wgContLang; global $wgShowDBErrorBacktrace; + global $wgLanguageCode; $wgShowDBErrorBacktrace = true; + $wgLanguageCode = 'en'; $wgContLang = new Language( 'en' ); $wgMemc = new EmptyBagOStuff; diff --git a/tests/phpunit/includes/GlobalTest.php b/tests/phpunit/includes/GlobalTest.php index fdcc82af56..5e6ae847c5 100644 --- a/tests/phpunit/includes/GlobalTest.php +++ b/tests/phpunit/includes/GlobalTest.php @@ -2,12 +2,13 @@ class GlobalTest extends MediaWikiTestCase { function setUp() { - global $wgReadOnlyFile, $wgContLang, $wgLang, $wgUrlProtocols; + global $wgReadOnlyFile, $wgContLang, $wgLang, $wgUrlProtocols, $wgLanguageCode; $this->originals['wgReadOnlyFile'] = $wgReadOnlyFile; $this->originals['wgUrlProtocols'] = $wgUrlProtocols; $wgReadOnlyFile = tempnam( wfTempDir(), "mwtest_readonly" ); $wgUrlProtocols[] = 'file://'; unlink( $wgReadOnlyFile ); + $wgLanguageCode = 'en'; $wgContLang = $wgLang = Language::factory( 'en' ); } -- 2.20.1