7 class ArticleTablesTest
extends MediaWikiLangTestCase
{
11 function testbug14404() {
12 global $wgUser, $wgContLang, $wgLanguageCode, $wgLang;
14 $title = Title
::newFromText("Bug 14404");
15 $article = new Article( $title );
17 $wgUser->mRights
= array( 'createpage', 'edit', 'purge' );
18 $wgLanguageCode = 'es';
19 $wgContLang = Language
::factory( 'es' );
21 $wgLang = Language
::factory( 'fr' );
22 $status = $article->doEdit( '{{:{{int:history}}}}', 'Test code for bug 14404', 0 );
23 $templates1 = $article->getUsedTemplates();
25 $wgLang = Language
::factory( 'de' );
26 $article->mParserOptions
= null; // Let it pick the new user language
27 $article->mPreparedEdit
= false; // In order to force the rerendering of the same wikitext
29 // We need an edit, a purge is not enough to regenerate the tables
30 $status = $article->doEdit( '{{:{{int:history}}}}', 'Test code for bug 14404', EDIT_UPDATE
);
31 $templates2 = $article->getUsedTemplates();
33 $this->assertEquals( $templates1, $templates2 );
34 $this->assertEquals( $templates1[0]->getFullText(), 'Historial' );