Merge "Warn if stateful ParserOutput transforms are used"
[lhc/web/wiklou.git] / tests / parser / TidySupport.php
index 6b5fb48..c0a9312 100644 (file)
@@ -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;