From 91e194556c52d2f354344f930419eef2dd6267f0 Mon Sep 17 00:00:00 2001 From: Pierre Schmitz Date: Wed, 4 Sep 2013 05:51:59 +0200 Subject: Update to MediaWiki 1.21.2 --- tests/phpunit/includes/ArticleTablesTest.php | 33 ++++++++++++++++++++++++++++ 1 file changed, 33 insertions(+) create mode 100644 tests/phpunit/includes/ArticleTablesTest.php (limited to 'tests/phpunit/includes/ArticleTablesTest.php') diff --git a/tests/phpunit/includes/ArticleTablesTest.php b/tests/phpunit/includes/ArticleTablesTest.php new file mode 100644 index 00000000..967ffa17 --- /dev/null +++ b/tests/phpunit/includes/ArticleTablesTest.php @@ -0,0 +1,33 @@ +mRights = array( 'createpage', 'edit', 'purge' ); + $wgLanguageCode = 'es'; + $wgContLang = Language::factory( 'es' ); + + $wgLang = Language::factory( 'fr' ); + $status = $page->doEditContent( new WikitextContent( '{{:{{int:history}}}}' ), 'Test code for bug 14404', 0, false, $user ); + $templates1 = $title->getTemplateLinksFrom(); + + $wgLang = Language::factory( 'de' ); + $page->mPreparedEdit = false; // In order to force the rerendering of the same wikitext + + // We need an edit, a purge is not enough to regenerate the tables + $status = $page->doEditContent( new WikitextContent( '{{:{{int:history}}}}' ), 'Test code for bug 14404', EDIT_UPDATE, false, $user ); + $templates2 = $title->getTemplateLinksFrom(); + + $this->assertEquals( $templates1, $templates2 ); + $this->assertEquals( $templates1[0]->getFullText(), 'Historial' ); + } + +} -- cgit v1.2.3-54-g00ecf