mirror of
https://github.com/diocloid/LinkTitles.git
synced 2025-07-13 09:49:31 +02:00
First working test.
This commit is contained in:
19
tests/phpunit/TestCase.php
Normal file
19
tests/phpunit/TestCase.php
Normal file
@ -0,0 +1,19 @@
|
||||
<?php
|
||||
namespace LinkTitles;
|
||||
|
||||
abstract class TestCase extends \MediaWikiTestCase {
|
||||
protected function setUp() {
|
||||
parent::setUp();
|
||||
$this->insertPage( 'link target', 'This page serves as a link target' );
|
||||
Extension::invalidateCache();
|
||||
}
|
||||
|
||||
protected function tearDown() {
|
||||
parent::tearDown();
|
||||
}
|
||||
|
||||
protected function getPageText( \WikiPage $page ) {
|
||||
$content = $page->getContent();
|
||||
return $page->getContentHandler()->serializeContent( $content );
|
||||
}
|
||||
}
|
Reference in New Issue
Block a user