X-Git-Url: https://git.heureux-cyclage.org/?a=blobdiff_plain;f=tests%2Fparser%2FParserTestRunner.php;h=b6c7b03a6ccc5b9bb38d52426cfd5d18b1f4d21a;hb=d312953b76b38849c0ec1481525947d43603a689;hp=bc5f1fca3e1cfafe52205e9fba433a0de483fef2;hpb=1db4c42f46b538b45aff231989ab495b317aceda;p=lhc%2Fweb%2Fwiklou.git diff --git a/tests/parser/ParserTestRunner.php b/tests/parser/ParserTestRunner.php index bc5f1fca3e..b6c7b03a6c 100644 --- a/tests/parser/ParserTestRunner.php +++ b/tests/parser/ParserTestRunner.php @@ -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,7 +1114,7 @@ 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 { @@ -1140,6 +1124,7 @@ class ParserTestRunner { # Suppress warnings about running tests without tidy Wikimedia\suppressWarnings(); wfDeprecated( 'disabling tidy' ); + wfDeprecated( 'MWTidy::setInstance' ); Wikimedia\restoreWarnings(); MWTidy::setInstance( $tidy );