X-Git-Url: https://git.heureux-cyclage.org/?a=blobdiff_plain;f=tests%2Fparser%2FTidySupport.php;h=c0a9312ba9e122874796635dc2f501a8a8a0d7d3;hb=cc122862fa411dbd5f2958ad91d568862f06d79e;hp=6b5fb4847f102116c3c4b2574c811e1e70023800;hpb=c8d361a38027ef5d808225b8a83f15417248aa67;p=lhc%2Fweb%2Fwiklou.git diff --git a/tests/parser/TidySupport.php b/tests/parser/TidySupport.php index 6b5fb4847f..c0a9312ba9 100644 --- a/tests/parser/TidySupport.php +++ b/tests/parser/TidySupport.php @@ -29,6 +29,7 @@ class TidySupport { /** * Determine if there is a usable tidy. + * @param bool $useConfiguration */ public function __construct( $useConfiguration = false ) { global $IP, $wgUseTidy, $wgTidyBin, $wgTidyInternal, $wgTidyConfig, @@ -58,14 +59,14 @@ class TidySupport { 'tidyConfigFile' => "$IP/includes/tidy/tidy.conf", 'tidyCommandLine' => '', ]; - if ( extension_loaded( 'tidy' ) && class_exists( 'tidy' ) ) { + if ( extension_loaded( 'tidy' ) && ( wfIsHHVM() || 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 ); + $path = ExecutableFinder::findInDefaultPaths( $wgTidyBin ); if ( $path !== false ) { $this->config['driver'] = 'RaggettExternal'; $this->config['tidyBin'] = $wgTidyBin;