X-Git-Url: http://git.heureux-cyclage.org/?a=blobdiff_plain;f=tests%2Fparser%2FTidySupport.php;h=559960def5b6e480791c550f441555d97c2b1d77;hb=5faa712760269dbb27303fb6c7e42dd20c409632;hp=6b5fb4847f102116c3c4b2574c811e1e70023800;hpb=9de4779e206628d8c7c9ae76785bfe825b5267d5;p=lhc%2Fweb%2Fwiklou.git diff --git a/tests/parser/TidySupport.php b/tests/parser/TidySupport.php index 6b5fb4847f..559960def5 100644 --- a/tests/parser/TidySupport.php +++ b/tests/parser/TidySupport.php @@ -29,9 +29,10 @@ class TidySupport { /** * Determine if there is a usable tidy. + * @param bool $useConfiguration */ public function __construct( $useConfiguration = false ) { - global $IP, $wgUseTidy, $wgTidyBin, $wgTidyInternal, $wgTidyConfig, + global $wgUseTidy, $wgTidyBin, $wgTidyInternal, $wgTidyConfig, $wgTidyConf, $wgTidyOpts; $this->enabled = true; @@ -54,26 +55,7 @@ class TidySupport { $this->enabled = false; } } else { - $this->config = [ - 'tidyConfigFile' => "$IP/includes/tidy/tidy.conf", - 'tidyCommandLine' => '', - ]; - if ( extension_loaded( 'tidy' ) && class_exists( 'tidy' ) ) { - $this->config['driver'] = wfIsHHVM() ? 'RaggettInternalHHVM' : 'RaggettInternalPHP'; - } else { - if ( is_executable( $wgTidyBin ) ) { - $this->config['driver'] = 'RaggettExternal'; - $this->config['tidyBin'] = $wgTidyBin; - } else { - $path = Installer::locateExecutableInDefaultPaths( $wgTidyBin ); - if ( $path !== false ) { - $this->config['driver'] = 'RaggettExternal'; - $this->config['tidyBin'] = $wgTidyBin; - } else { - $this->enabled = false; - } - } - } + $this->config = [ 'driver' => 'RemexHtml' ]; } if ( !$this->enabled ) { $this->config = [ 'driver' => 'disabled' ];