Define $wgAlwaysUseTidy to false where needed in unit tests
authorAlexandre Emsenhuber <ialex.wiki@gmail.com>
Wed, 7 Nov 2012 22:08:56 +0000 (23:08 +0100)
committerAlexandre Emsenhuber <ialex.wiki@gmail.com>
Wed, 7 Nov 2012 22:08:56 +0000 (23:08 +0100)
Tidy changes some whitespaces in the HTML which breaks the tests if enabled.

Change-Id: Ib44f60c0d4b595c76c258b41962c3c45ca21ac3e

tests/phpunit/includes/content/TextContentTest.php
tests/phpunit/includes/parser/TagHooksTest.php

index 337945d..52e168b 100644 (file)
@@ -21,7 +21,8 @@ class TextContentTest extends MediaWikiTestCase {
                                CONTENT_MODEL_WIKITEXT,
                                CONTENT_MODEL_CSS,
                                CONTENT_MODEL_JAVASCRIPT,
-                       )
+                       ),
+                       'wgAlwaysUseTidy' => false,
                ) );
 
                $this->context = new RequestContext( new FauxRequest() );
index d089aff..292f13a 100644 (file)
@@ -12,7 +12,13 @@ class TagHookTest extends MediaWikiTestCase {
        public static function provideBadNames() {
                return array( array( "foo<bar" ), array( "foo>bar" ), array( "foo\nbar" ),  array( "foo\rbar" ) );
        }
-               
+
+       protected function setUp() {
+               parent::setUp();
+
+               $this->setMwGlobals( 'wgAlwaysUseTidy', false );
+       }
+
        /**
         * @dataProvider provideValidNames
         */