Compress images
[mediawiki.git] / tests / phpunit / includes / ArticleTablesTest.php
blob02571b55c9e1fbc19f1fcafe36bee43a90416502
1 <?php
3 /**
4 * @group Database
5 */
6 class ArticleTablesTest extends MediaWikiLangTestCase {
8 function testbug14404() {
9 global $wgContLang, $wgLanguageCode, $wgLang;
11 $title = Title::newFromText( 'Bug 14404' );
12 $page = WikiPage::factory( $title );
13 $user = new User();
14 $user->mRights = array( 'createpage', 'edit', 'purge' );
15 $wgLanguageCode = 'es';
16 $wgContLang = Language::factory( 'es' );
18 $wgLang = Language::factory( 'fr' );
19 $status = $page->doEdit( '{{:{{int:history}}}}', 'Test code for bug 14404', 0, false, $user );
20 $templates1 = $page->getUsedTemplates();
22 $wgLang = Language::factory( 'de' );
23 $page->mPreparedEdit = false; // In order to force the rerendering of the same wikitext
25 // We need an edit, a purge is not enough to regenerate the tables
26 $status = $page->doEdit( '{{:{{int:history}}}}', 'Test code for bug 14404', EDIT_UPDATE, false, $user );
27 $templates2 = $page->getUsedTemplates();
29 $this->assertEquals( $templates1, $templates2 );
30 $this->assertEquals( $templates1[0]->getFullText(), 'Historial' );