Merge "parserTests: Do not check for DjVu support"
authorjenkins-bot <jenkins-bot@gerrit.wikimedia.org>
Tue, 4 Oct 2016 21:41:43 +0000 (21:41 +0000)
committerGerrit Code Review <gerrit@wikimedia.org>
Tue, 4 Oct 2016 21:41:43 +0000 (21:41 +0000)
tests/parser/ParserTestRunner.php
tests/phpunit/mocks/media/MockDjVuHandler.php

index 6ca851e..a0d6b22 100644 (file)
@@ -59,11 +59,6 @@ class ParserTestRunner {
         */
        private $dbClone;
 
-       /**
-        * @var DjVuSupport
-        */
-       private $djVuSupport;
-
        /**
         * @var TidySupport
         */
@@ -138,7 +133,6 @@ class ParserTestRunner {
                $this->runDisabled = !empty( $options['run-disabled'] );
                $this->runParsoid = !empty( $options['run-parsoid'] );
 
-               $this->djVuSupport = new DjVuSupport();
                $this->tidySupport = new TidySupport( !empty( $options['use-tidy-config'] ) );
                if ( !$this->tidySupport->isEnabled() ) {
                        $this->recorder->warning(
@@ -456,7 +450,6 @@ class ParserTestRunner {
                }
                $this->setupDone[$funcName] = true;
                return function () use ( $funcName ) {
-                       wfDebug( "markSetupDone unmarked $funcName" );
                        $this->setupDone[$funcName] = false;
                };
        }
@@ -752,14 +745,6 @@ class ParserTestRunner {
                $user = $context->getUser();
                $options = ParserOptions::newFromContext( $context );
 
-               if ( isset( $opts['djvu'] ) ) {
-                       if ( !$this->djVuSupport->isEnabled() ) {
-                               $this->recorder->skipped( $test,
-                                       'djvu binaries do not exist or are not executable' );
-                               return false;
-                       }
-               }
-
                if ( isset( $opts['tidy'] ) ) {
                        if ( !$this->tidySupport->isEnabled() ) {
                                $this->recorder->skipped( $test, 'tidy extension is not installed' );
@@ -1028,7 +1013,6 @@ class ParserTestRunner {
                };
 
                // Set content language. This invalidates the magic word cache and title services
-               wfDebug( "Setting up language $langCode" );
                $lang = Language::factory( $langCode );
                $setup['wgContLang'] = $lang;
                $reset = function () {
index 018d978..0e0b943 100644 (file)
  */
 
 class MockDjVuHandler extends DjVuHandler {
+       function isEnabled() {
+               return true;
+       }
+
        function doTransform( $image, $dstPath, $dstUrl, $params, $flags = 0 ) {
                if ( !$this->normaliseParams( $image, $params ) ) {
                        return new TransformParameterError( $params );