From: Platonides Date: Sun, 20 Feb 2011 00:44:33 +0000 (+0000) Subject: Fix ArticleTablesTest after r81528. It needs to set both $wgLanguageCode and $wgContLang. X-Git-Tag: 1.31.0-rc.0~31864 X-Git-Url: http://git.cyclocoop.org/%24action?a=commitdiff_plain;h=1810cf1af1fcfd13c0f13897d09e02de726b50e2;p=lhc%2Fweb%2Fwiklou.git Fix ArticleTablesTest after r81528. It needs to set both $wgLanguageCode and $wgContLang. Added setUp() and teardown() --- diff --git a/tests/phpunit/includes/ArticleTablesTest.php b/tests/phpunit/includes/ArticleTablesTest.php index 96b4ea9116..3db0b55109 100644 --- a/tests/phpunit/includes/ArticleTablesTest.php +++ b/tests/phpunit/includes/ArticleTablesTest.php @@ -6,13 +6,27 @@ */ class ArticleTablesTest extends MediaWikiTestCase { + function setUp() { + global $wgLanguageCode; + + $this->languageCode = $wgLanguageCode; + } + + function tearDown() { + global $wgLanguageCode, $wgContLang, $wgLang; + $wgLanguageCode = $this->languageCode; + $wgContLang = new StubContLang; + $wgLang = new StubUserLang; + } + function testbug14404() { - global $wgUser, $wgContLang, $wgLang; + global $wgUser, $wgContLang, $wgLanguageCode, $wgLang; $title = Title::newFromText("Bug 14404"); $article = new Article( $title ); $wgUser = new User(); $wgUser->mRights = array( 'createpage', 'edit', 'purge' ); + $wgLanguageCode = 'es'; $wgContLang = Language::factory( 'es' ); $wgLang = Language::factory( 'fr' );