r90161 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r90160‎ | r90161 | r90162 >
Date:21:22, 15 June 2011
Author:platonides
Status:resolved
Tags:
Comment:
r87164 removed mDataLoaded and broke this test databaseless nature.
Modified paths:
  • /trunk/phase3/tests/phpunit/includes/LanguageConverterTest.php (modified) (history)

Diff [purge]

Index: trunk/phase3/tests/phpunit/includes/LanguageConverterTest.php
@@ -1,6 +1,5 @@
22 <?php
33
4 -
54 class LanguageConverterTest extends MediaWikiLangTestCase {
65 protected $lang = null;
76 protected $lc = null;
@@ -19,11 +18,11 @@
2019 }
2120
2221 function tearDown() {
23 - global $wgMemc, $wgContLang;
 22+ global $wgMemc;
2423 unset( $wgMemc );
2524 unset( $this->lc );
2625 unset( $this->lang );
27 - $wgContLang = Language::factory( 'en' );
 26+ parent::tearDown();
2827 }
2928
3029 function testGetPreferredVariantDefaults() {
@@ -63,6 +62,7 @@
6463
6564 $wgUser = new User;
6665 $wgUser->setId( 1 );
 66+ $wgUser->mFrom = 'defaults';
6767 $wgUser->mDataLoaded = true;
6868 $wgUser->mOptionsLoaded = true;
6969 $wgUser->setOption( 'variant', 'tg-latn' );
@@ -77,7 +77,7 @@
7878 $wgRequest->setVal( 'variant', 'tg' );
7979 $wgUser = User::newFromId( "admin" );
8080 $wgUser->setId( 1 );
81 - $wgUser->mDataLoaded = true;
 81+ $wgUser->mFrom = 'defaults';
8282 $wgUser->mOptionsLoaded = true;
8383 $wgUser->setOption( 'variant', 'tg-latn' ); // The user's data is ignored
8484 // because the variant is set in the URL.

Follow-up revisions

RevisionCommit summaryAuthorDate
r90170Followup 90161 (which breaks the test). Need to hack around to avoid a reload...platonides21:32, 15 June 2011

Past revisions this follows-up on

RevisionCommit summaryAuthorDate
r87164Recommit r87129 and follow-ups but with a fix for the bug Brion found (sorry)ialex14:08, 30 April 2011

Status & tagging log