From: Alexandre Emsenhuber Date: Wed, 25 May 2011 18:37:32 +0000 (+0000) Subject: Also change $wgLanguageCode along with $wgContLang, this was breaking when arriving... X-Git-Tag: 1.31.0-rc.0~29947 X-Git-Url: http://git.cyclocoop.org/%7B%24www_url%7Dadmin/compta/operations/recherche.php?a=commitdiff_plain;h=6ed5d0209400e77c387c0031ca155b88e3b04370;p=lhc%2Fweb%2Fwiklou.git Also change $wgLanguageCode along with $wgContLang, this was breaking when arriving at LanguageConverterTest with "nooo!" --- 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' ); }