From 1455fe4e21c9883cd8941fecda7a907c2df994d4 Mon Sep 17 00:00:00 2001 From: Alexandre Emsenhuber Date: Fri, 5 Aug 2011 15:10:08 +0000 Subject: [PATCH] $wgLanguageCode applies to $wgContLang, not $wgLang. This was breaking the test suite by dying with a "nooo!" in when reaching LanguageConverterTest. --- tests/phpunit/includes/HtmlTest.php | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) diff --git a/tests/phpunit/includes/HtmlTest.php b/tests/phpunit/includes/HtmlTest.php index b38ae18afc..7cd98d8816 100644 --- a/tests/phpunit/includes/HtmlTest.php +++ b/tests/phpunit/includes/HtmlTest.php @@ -3,19 +3,23 @@ class HtmlTest extends MediaWikiTestCase { private static $oldLang; + private static $oldContLang; public function setUp() { - global $wgLang, $wgLanguageCode; + global $wgLang, $wgContLang, $wgLanguageCode; self::$oldLang = $wgLang; + self::$oldContLang = $wgContLang; + $wgLanguageCode = 'en'; - $wgLang = Language::factory( $wgLanguageCode ); + $wgContLang = $wgLang = Language::factory( $wgLanguageCode ); } public function tearDown() { - global $wgLang, $wgLanguageCode; + global $wgLang, $wgContLang, $wgLanguageCode; $wgLang = self::$oldLang; - $wgLanguageCode = $wgLang->getCode(); + $wgContLang = self::$oldContLang; + $wgLanguageCode = $wgContLang->getCode(); } public function testExpandAttributesSkipsNullAndFalse() { -- 2.20.1