r93979 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r93978‎ | r93979 | r93980 >
Date:15:10, 5 August 2011
Author:ialex
Status:ok
Tags:
Comment:
$wgLanguageCode applies to $wgContLang, not $wgLang. This was breaking the test suite by dying with a "nooo!" in when reaching LanguageConverterTest.
Modified paths:
  • /trunk/phase3/tests/phpunit/includes/HtmlTest.php (modified) (history)

Diff [purge]

Index: trunk/phase3/tests/phpunit/includes/HtmlTest.php
@@ -3,19 +3,23 @@
44
55 class HtmlTest extends MediaWikiTestCase {
66 private static $oldLang;
 7+ private static $oldContLang;
78
89 public function setUp() {
9 - global $wgLang, $wgLanguageCode;
 10+ global $wgLang, $wgContLang, $wgLanguageCode;
1011
1112 self::$oldLang = $wgLang;
 13+ self::$oldContLang = $wgContLang;
 14+
1215 $wgLanguageCode = 'en';
13 - $wgLang = Language::factory( $wgLanguageCode );
 16+ $wgContLang = $wgLang = Language::factory( $wgLanguageCode );
1417 }
1518
1619 public function tearDown() {
17 - global $wgLang, $wgLanguageCode;
 20+ global $wgLang, $wgContLang, $wgLanguageCode;
1821 $wgLang = self::$oldLang;
19 - $wgLanguageCode = $wgLang->getCode();
 22+ $wgContLang = self::$oldContLang;
 23+ $wgLanguageCode = $wgContLang->getCode();
2024 }
2125
2226 public function testExpandAttributesSkipsNullAndFalse() {

Status & tagging log