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