The Tidy extension for HHVM is nominally usable, but does not provide error
text returns. Tests should use TidySupport to determine whether they should use
the Tidy extension or not.
Change-Id: I0f842ddf8484206fc2a8b01289bc0a6750f34fed
* @group HtmlFormatter
*/
class HtmlFormatterTest extends MediaWikiTestCase {
+
+ /**
+ * Use TidySupport to check whether we should use $wgTidyInternal.
+ *
+ * The Tidy extension in HHVM does not support error text return, so it is
+ * nominally usable, but does not pass tests which require error text from
+ * Tidy.
+ */
+ protected function setUp() {
+ parent::setUp();
+ $tidySupport = new TidySupport();
+ $this->setMwGlobals( 'wgTidyInternal', $tidySupport->isInternal() );
+ }
+
/**
* @dataProvider getHtmlData
*
global $wgTidyBin;
$this->internalTidy = extension_loaded( 'tidy' ) &&
- class_exists( 'tidy' );
+ class_exists( 'tidy' ) && !wfIsHHVM();
$this->externalTidy = is_executable( $wgTidyBin ) ||
Installer::locateExecutableInDefaultPaths( array( $wgTidyBin ) )