Index: trunk/phase3/tests/phpunit/includes/LanguageConverterTest.php |
— | — | @@ -1,6 +1,5 @@ |
2 | 2 | <?php |
3 | 3 | |
4 | | - |
5 | 4 | class LanguageConverterTest extends MediaWikiLangTestCase { |
6 | 5 | protected $lang = null; |
7 | 6 | protected $lc = null; |
— | — | @@ -19,11 +18,11 @@ |
20 | 19 | } |
21 | 20 | |
22 | 21 | function tearDown() { |
23 | | - global $wgMemc, $wgContLang; |
| 22 | + global $wgMemc; |
24 | 23 | unset( $wgMemc ); |
25 | 24 | unset( $this->lc ); |
26 | 25 | unset( $this->lang ); |
27 | | - $wgContLang = Language::factory( 'en' ); |
| 26 | + parent::tearDown(); |
28 | 27 | } |
29 | 28 | |
30 | 29 | function testGetPreferredVariantDefaults() { |
— | — | @@ -63,6 +62,7 @@ |
64 | 63 | |
65 | 64 | $wgUser = new User; |
66 | 65 | $wgUser->setId( 1 ); |
| 66 | + $wgUser->mFrom = 'defaults'; |
67 | 67 | $wgUser->mDataLoaded = true; |
68 | 68 | $wgUser->mOptionsLoaded = true; |
69 | 69 | $wgUser->setOption( 'variant', 'tg-latn' ); |
— | — | @@ -77,7 +77,7 @@ |
78 | 78 | $wgRequest->setVal( 'variant', 'tg' ); |
79 | 79 | $wgUser = User::newFromId( "admin" ); |
80 | 80 | $wgUser->setId( 1 ); |
81 | | - $wgUser->mDataLoaded = true; |
| 81 | + $wgUser->mFrom = 'defaults'; |
82 | 82 | $wgUser->mOptionsLoaded = true; |
83 | 83 | $wgUser->setOption( 'variant', 'tg-latn' ); // The user's data is ignored |
84 | 84 | // because the variant is set in the URL. |