Merge "Skip tests in PrefixSearchTest if not wikitext main namespace"
authorjenkins-bot <jenkins-bot@gerrit.wikimedia.org>
Mon, 20 Oct 2014 10:18:53 +0000 (10:18 +0000)
committerGerrit Code Review <gerrit@wikimedia.org>
Mon, 20 Oct 2014 10:18:53 +0000 (10:18 +0000)
tests/phpunit/includes/PrefixSearchTest.php

index 5390dba..5b16435 100644 (file)
@@ -8,6 +8,12 @@ class PrefixSearchTest extends MediaWikiTestCase {
        protected function setUp() {
                parent::setUp();
 
+               if ( !$this->isWikitextNS( NS_MAIN ) ) {
+                       $this->markTestSkipped( 'Main namespace does not support wikitext.' );
+               }
+
+               $this->insertPages();
+
                // Avoid special pages from extensions interferring with the tests
                $this->setMwGlobals( 'wgSpecialPages', array() );
        }
@@ -27,7 +33,7 @@ class PrefixSearchTest extends MediaWikiTestCase {
                }
        }
 
-       public function addDBData() {
+       public function insertPages() {
                $this->insertPage( 'Sandbox' );
                $this->insertPage( 'Bar' );
                $this->insertPage( 'Example' );