6 class ArticleTablesTest
extends MediaWikiLangTestCase
{
9 * @covers Title::getTemplateLinksFrom
10 * @covers Title::getLinksFrom
11 * @todo give this test a real name explaining what is being tested here
13 public function testbug14404() {
14 $title = Title
::newFromText( 'Bug 14404' );
15 $page = WikiPage
::factory( $title );
17 $user->mRights
= array( 'createpage', 'edit', 'purge' );
18 $this->setMwGlobals( 'wgLanguageCode', 'es' );
19 $this->setMwGlobals( 'wgContLang', Language
::factory( 'es' ) );
20 $this->setMwGlobals( 'wgLang', Language
::factory( 'fr' ) );
23 new WikitextContent( '{{:{{int:history}}}}' ),
24 'Test code for bug 14404',
29 $templates1 = $title->getTemplateLinksFrom();
31 $this->setMwGlobals( 'wgLang', Language
::factory( 'de' ) );
32 $page = WikiPage
::factory( $title ); // In order to force the re-rendering of the same wikitext
34 // We need an edit, a purge is not enough to regenerate the tables
36 new WikitextContent( '{{:{{int:history}}}}' ),
37 'Test code for bug 14404',
42 $templates2 = $title->getTemplateLinksFrom();
45 * @var Title[] $templates1
46 * @var Title[] $templates2
48 $this->assertEquals( $templates1, $templates2 );
49 $this->assertEquals( $templates1[0]->getFullText(), 'Historial' );