r82501 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r82500‎ | r82501 | r82502 >
Date:00:44, 20 February 2011
Author:platonides
Status:ok
Tags:
Comment:
Fix ArticleTablesTest after r81528. It needs to set both $wgLanguageCode and $wgContLang.
Added setUp() and teardown()
Modified paths:
  • /trunk/phase3/tests/phpunit/includes/ArticleTablesTest.php (modified) (history)

Diff [purge]

Index: trunk/phase3/tests/phpunit/includes/ArticleTablesTest.php
@@ -6,13 +6,27 @@
77 */
88 class ArticleTablesTest extends MediaWikiTestCase {
99
 10+ function setUp() {
 11+ global $wgLanguageCode;
 12+
 13+ $this->languageCode = $wgLanguageCode;
 14+ }
 15+
 16+ function tearDown() {
 17+ global $wgLanguageCode, $wgContLang, $wgLang;
 18+ $wgLanguageCode = $this->languageCode;
 19+ $wgContLang = new StubContLang;
 20+ $wgLang = new StubUserLang;
 21+ }
 22+
1023 function testbug14404() {
11 - global $wgUser, $wgContLang, $wgLang;
 24+ global $wgUser, $wgContLang, $wgLanguageCode, $wgLang;
1225
1326 $title = Title::newFromText("Bug 14404");
1427 $article = new Article( $title );
1528 $wgUser = new User();
1629 $wgUser->mRights = array( 'createpage', 'edit', 'purge' );
 30+ $wgLanguageCode = 'es';
1731 $wgContLang = Language::factory( 'es' );
1832
1933 $wgLang = Language::factory( 'fr' );

Past revisions this follows-up on

RevisionCommit summaryAuthorDate
r81528Use wfMessage() instead of wfMsgGetKey()ialex16:52, 4 February 2011

Status & tagging log