* @group Database
*/
-if ( !defined( 'MEDIAWIKI' ) ) {
- die( 1 );
-}
-
-global $IP;
-require_once "$IP/includes/QueryPage.php"; // Needed to populate $wgQueryPages
-
+/**
+ * @covers QueryPage<extended>
+ */
class QueryAllSpecialPagesTest extends MediaWikiTestCase {
/** List query pages that can not be tested automatically */
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;
* Test SQL for each of our QueryPages objects
* @group Database
*/
- function testQuerypageSqlQuery() {
+ public function testQuerypageSqlQuery() {
global $wgDBtype;
foreach ( $this->queryPages as $page ) {