*/
private $dbClone;
- /**
- * @var TidySupport
- */
- private $tidySupport;
-
/**
* @var TidyDriverBase
*/
$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'];
}
$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'] ) ) {
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 {
# Suppress warnings about running tests without tidy
Wikimedia\suppressWarnings();
wfDeprecated( 'disabling tidy' );
+ wfDeprecated( 'MWTidy::setInstance' );
Wikimedia\restoreWarnings();
MWTidy::setInstance( $tidy );