LinkTitles extension for MediaWiki
Automatically add links to existing pages.
TestCase.php
1 <?php
22 namespace LinkTitles;
23 
24 abstract class TestCase extends \MediaWikiTestCase {
25  protected function setUp() {
26  parent::setUp();
27  }
28 
29  protected function tearDown() {
30  parent::tearDown();
31  }
32 
33  public function addDBDataOnce() {
34  parent::addDBDataOnce();
35  $this->insertPage( 'link target', 'This page serves as a link target' );
36  Targets::invalidate(); // force re-querying the pages table
37  }
38 
39  protected function getPageText( \WikiPage $page ) {
40  $content = $page->getContent();
41  return $page->getContentHandler()->serializeContent( $content );
42  }
43 }
The LinkTitles class holds configuration for the LinkTitles extension.
Definition: Config.php:23