*/
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();
$this->markTestSkipped( 'Main namespace does not support wikitext.' );
}
- $this->insertPages();
-
// Avoid special pages from extensions interferring with the tests
$this->setMwGlobals( 'wgSpecialPages', array() );
}
}
}
- 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(