From: Alexandre Emsenhuber Date: Sat, 20 Oct 2012 16:15:18 +0000 (+0200) Subject: Setting $wgContLang without changing $wgLanguageCode accordingly is a very bad idea. X-Git-Tag: 1.31.0-rc.0~21915^2 X-Git-Url: https://git.cyclocoop.org/%7B%24admin_url%7Dcompta/operations/modifier.php?a=commitdiff_plain;h=2b0edc83e91dbba6b250386eac0c78b7d8c7c4f4;p=lhc%2Fweb%2Fwiklou.git Setting $wgContLang without changing $wgLanguageCode accordingly is a very bad idea. This caused about 200 exceptions "MWException: Error in MediaWikiLangTestCase::setUp(): $wgLanguageCode ('fr') is different from $wgContLang->getCode() (en)" on my installation. Change-Id: I2987db68e22b27d8d36cdae118356fd7612e56a4 --- diff --git a/tests/phpunit/includes/BlockTest.php b/tests/phpunit/includes/BlockTest.php index 5ac05baceb..29931c87cf 100644 --- a/tests/phpunit/includes/BlockTest.php +++ b/tests/phpunit/includes/BlockTest.php @@ -13,7 +13,10 @@ class BlockTest extends MediaWikiLangTestCase { protected function setUp() { parent::setUp(); - $this->setMwGlobals( 'wgContLang', Language::factory( 'en' ) ); + $this->setMwGlobals( array( + 'wgLanguageCode' => 'en', + 'wgContLang' => Language::factory( 'en' ) + ) ); } function addDBData() {