From 2b0edc83e91dbba6b250386eac0c78b7d8c7c4f4 Mon Sep 17 00:00:00 2001 From: Alexandre Emsenhuber Date: Sat, 20 Oct 2012 18:15:18 +0200 Subject: [PATCH] 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 --- tests/phpunit/includes/BlockTest.php | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) 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() { -- 2.20.1