Index: trunk/phase3/tests/phpunit/includes/ArticleTablesTest.php |
— | — | @@ -6,13 +6,27 @@ |
7 | 7 | */ |
8 | 8 | class ArticleTablesTest extends MediaWikiTestCase { |
9 | 9 | |
| 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 | + |
10 | 23 | function testbug14404() { |
11 | | - global $wgUser, $wgContLang, $wgLang; |
| 24 | + global $wgUser, $wgContLang, $wgLanguageCode, $wgLang; |
12 | 25 | |
13 | 26 | $title = Title::newFromText("Bug 14404"); |
14 | 27 | $article = new Article( $title ); |
15 | 28 | $wgUser = new User(); |
16 | 29 | $wgUser->mRights = array( 'createpage', 'edit', 'purge' ); |
| 30 | + $wgLanguageCode = 'es'; |
17 | 31 | $wgContLang = Language::factory( 'es' ); |
18 | 32 | |
19 | 33 | $wgLang = Language::factory( 'fr' ); |