Some bugzilla.wikimedia.org -> phabricator.wikimedia.org changes
[lhc/web/wiklou.git] / tests / phpunit / includes / HtmlFormatterTest.php
index ae5c9c4..df54914 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
         */
@@ -100,7 +114,7 @@ class HtmlFormatterTest extends MediaWikiTestCase {
                                array(),
                                $removeTags, // Have some rules to trigger a DOM parse
                        ),
-                       // https://bugzilla.wikimedia.org/show_bug.cgi?id=53086
+                       // https://phabricator.wikimedia.org/T55086
                        array(
                                'Foo<sup id="cite_ref-1" class="reference"><a href="#cite_note-1">[1]</a></sup>'
                                        . ' <a href="/wiki/Bar" title="Bar" class="mw-redirect">Bar</a>',