Merge "i18n: Escape the File and Category namespaces in error links to pages"
[lhc/web/wiklou.git] / tests / parser / ParserTestRunner.php
index 12c60a7..b6c7b03 100644 (file)
@@ -75,11 +75,6 @@ class ParserTestRunner {
         */
        private $dbClone;
 
-       /**
-        * @var TidySupport
-        */
-       private $tidySupport;
-
        /**
         * @var TidyDriverBase
         */
@@ -167,12 +162,6 @@ class ParserTestRunner {
 
                $this->disableSaveParse = !empty( $options['disable-save-parse'] );
 
-               $this->tidySupport = new TidySupport( !empty( $options['use-tidy-config'] ) );
-               if ( !$this->tidySupport->isEnabled() ) {
-                       $this->recorder->warning(
-                               "Warning: tidy is not installed, skipping some tests\n" );
-               }
-
                if ( isset( $options['upload-dir'] ) ) {
                        $this->uploadDir = $options['upload-dir'];
                }
@@ -833,12 +822,7 @@ class ParserTestRunner {
                $options->setTimestamp( $this->getFakeTimestamp() );
 
                if ( isset( $opts['tidy'] ) ) {
-                       if ( !$this->tidySupport->isEnabled() ) {
-                               $this->recorder->skipped( $test, 'tidy extension is not installed' );
-                               return false;
-                       } else {
-                               $options->setTidy( true );
-                       }
+                       $options->setTidy( true );
                }
 
                if ( isset( $opts['title'] ) ) {
@@ -1130,12 +1114,19 @@ class ParserTestRunner {
                if ( isset( $opts['tidy'] ) ) {
                        // Cache a driver instance
                        if ( $this->tidyDriver === null ) {
-                               $this->tidyDriver = MWTidy::factory( $this->tidySupport->getConfig() );
+                               $this->tidyDriver = MWTidy::factory();
                        }
                        $tidy = $this->tidyDriver;
                } else {
                        $tidy = false;
                }
+
+               # Suppress warnings about running tests without tidy
+               Wikimedia\suppressWarnings();
+               wfDeprecated( 'disabling tidy' );
+               wfDeprecated( 'MWTidy::setInstance' );
+               Wikimedia\restoreWarnings();
+
                MWTidy::setInstance( $tidy );
                $teardown[] = function () {
                        MWTidy::destroySingleton();
@@ -1224,7 +1215,6 @@ class ParserTestRunner {
                        // The new tables for comments are in use
                        $tables[] = 'comment';
                        $tables[] = 'revision_comment_temp';
-                       $tables[] = 'image_comment_temp';
                }
 
                if ( $wgActorTableSchemaMigrationStage & SCHEMA_COMPAT_WRITE_NEW ) {