Merge "Add hook to allow lazy loading of import sources"
[lhc/web/wiklou.git] / tests / phpunit / includes / HtmlFormatterTest.php
index ae5c9c4..1c3e853 100644 (file)
@@ -4,11 +4,25 @@
  * @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
         *
         * @param string $input
-        * @param $expectedText
+        * @param string $expectedText
         * @param array $expectedRemoved
         * @param callable|bool $callback
         */