MediaWiki
REL1_19
|
00001 <?php 00002 00006 class ArticleTablesTest extends MediaWikiLangTestCase { 00007 00008 function testbug14404() { 00009 global $wgContLang, $wgLanguageCode, $wgLang; 00010 00011 $title = Title::newFromText( 'Bug 14404' ); 00012 $page = WikiPage::factory( $title ); 00013 $user = new User(); 00014 $user->mRights = array( 'createpage', 'edit', 'purge' ); 00015 $wgLanguageCode = 'es'; 00016 $wgContLang = Language::factory( 'es' ); 00017 00018 $wgLang = Language::factory( 'fr' ); 00019 $status = $page->doEdit( '{{:{{int:history}}}}', 'Test code for bug 14404', 0, false, $user ); 00020 $templates1 = $page->getUsedTemplates(); 00021 00022 $wgLang = Language::factory( 'de' ); 00023 $page->mPreparedEdit = false; // In order to force the rerendering of the same wikitext 00024 00025 // We need an edit, a purge is not enough to regenerate the tables 00026 $status = $page->doEdit( '{{:{{int:history}}}}', 'Test code for bug 14404', EDIT_UPDATE, false, $user ); 00027 $templates2 = $page->getUsedTemplates(); 00028 00029 $this->assertEquals( $templates1, $templates2 ); 00030 $this->assertEquals( $templates1[0]->getFullText(), 'Historial' ); 00031 } 00032 00033 }