X-Git-Url: http://git.heureux-cyclage.org/?a=blobdiff_plain;f=tests%2Fphpunit%2Fincludes%2FPrefixSearchTest.php;h=d63541b7e3ebcb2d615f8572be708e322c1f8859;hb=05042d5c026123f3e40719cbc5bf78069b8508c0;hp=e7370566e7cacdaf463a037fe8b508f14ce7468d;hpb=7156272fc93307e080c2b4de42cb36be2093e001;p=lhc%2Fweb%2Fwiklou.git diff --git a/tests/phpunit/includes/PrefixSearchTest.php b/tests/phpunit/includes/PrefixSearchTest.php index e7370566e7..d63541b7e3 100644 --- a/tests/phpunit/includes/PrefixSearchTest.php +++ b/tests/phpunit/includes/PrefixSearchTest.php @@ -5,6 +5,28 @@ */ class PrefixSearchTest extends MediaWikiLangTestCase { + public function addDBData() { + $this->insertPage( 'Sandbox' ); + $this->insertPage( 'Bar' ); + $this->insertPage( 'Example' ); + $this->insertPage( 'Example Bar' ); + $this->insertPage( 'Example Foo' ); + $this->insertPage( 'Example Foo/Bar' ); + $this->insertPage( 'Example/Baz' ); + $this->insertPage( 'Redirect test', '#REDIRECT [[Redirect Test]]' ); + $this->insertPage( 'Redirect Test' ); + $this->insertPage( 'Redirect Test Worse Result' ); + $this->insertPage( 'Redirect test2', '#REDIRECT [[Redirect Test2]]' ); + $this->insertPage( 'Redirect TEST2', '#REDIRECT [[Redirect Test2]]' ); + $this->insertPage( 'Redirect Test2' ); + $this->insertPage( 'Redirect Test2 Worse Result' ); + + $this->insertPage( 'Talk:Sandbox' ); + $this->insertPage( 'Talk:Example' ); + + $this->insertPage( 'User:Example' ); + } + protected function setUp() { parent::setUp(); @@ -12,8 +34,6 @@ class PrefixSearchTest extends MediaWikiLangTestCase { $this->markTestSkipped( 'Main namespace does not support wikitext.' ); } - $this->insertPages(); - // Avoid special pages from extensions interferring with the tests $this->setMwGlobals( 'wgSpecialPages', array() ); } @@ -33,28 +53,6 @@ class PrefixSearchTest extends MediaWikiLangTestCase { } } - public function insertPages() { - $this->insertPage( 'Sandbox' ); - $this->insertPage( 'Bar' ); - $this->insertPage( 'Example' ); - $this->insertPage( 'Example Bar' ); - $this->insertPage( 'Example Foo' ); - $this->insertPage( 'Example Foo/Bar' ); - $this->insertPage( 'Example/Baz' ); - $this->insertPage( 'Redirect test', '#REDIRECT [[Redirect Test]]' ); - $this->insertPage( 'Redirect Test' ); - $this->insertPage( 'Redirect Test Worse Result' ); - $this->insertPage( 'Redirect test2', '#REDIRECT [[Redirect Test2]]' ); - $this->insertPage( 'Redirect TEST2', '#REDIRECT [[Redirect Test2]]' ); - $this->insertPage( 'Redirect Test2' ); - $this->insertPage( 'Redirect Test2 Worse Result' ); - - $this->insertPage( 'Talk:Sandbox' ); - $this->insertPage( 'Talk:Example' ); - - $this->insertPage( 'User:Example' ); - } - public static function provideSearch() { return array( array( array(