Merge "Remove SearchEngineReplacePrefixesComplete hook"
[lhc/web/wiklou.git] / tests / phpunit / includes / specials / QueryAllSpecialPagesTest.php
index ba845eb..f92dc66 100644 (file)
@@ -8,13 +8,6 @@
  * @group Database
  */
 
-if ( !defined( 'MEDIAWIKI' ) ) {
-       die( 1 );
-}
-
-global $IP;
-require_once "$IP/includes/QueryPage.php"; // Needed to populate $wgQueryPages
-
 /**
  * @covers QueryPage<extended>
  */
@@ -41,8 +34,7 @@ class QueryAllSpecialPagesTest extends MediaWikiTestCase {
        function __construct() {
                parent::__construct();
 
-               global $wgQueryPages;
-               foreach ( $wgQueryPages as $page ) {
+               foreach ( QueryPage::getPages() as $page ) {
                        $class = $page[0];
                        if ( !in_array( $class, $this->manualTest ) ) {
                                $this->queryPages[$class] = new $class;
@@ -58,14 +50,14 @@ class QueryAllSpecialPagesTest extends MediaWikiTestCase {
                global $wgDBtype;
 
                foreach ( $this->queryPages as $page ) {
-
                        // With MySQL, skips special pages reopening a temporary table
                        // See http://bugs.mysql.com/bug.php?id=10327
                        if (
                                $wgDBtype === 'mysql'
                                && in_array( $page->getName(), $this->reopensTempTable )
                        ) {
-                               $this->markTestSkipped( "SQL query for page {$page->getName()} can not be tested on MySQL backend (it reopens a temporary table)" );
+                               $this->markTestSkipped( "SQL query for page {$page->getName()} "
+                                       . "can not be tested on MySQL backend (it reopens a temporary table)" );
                                continue;
                        }