Setting $wgContLang without changing $wgLanguageCode accordingly is a very bad idea.
authorAlexandre Emsenhuber <ialex.wiki@gmail.com>
Sat, 20 Oct 2012 16:15:18 +0000 (18:15 +0200)
committerAlexandre Emsenhuber <ialex.wiki@gmail.com>
Sat, 20 Oct 2012 16:15:18 +0000 (18:15 +0200)
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

index 5ac05ba..29931c8 100644 (file)
@@ -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() {