From: Alexandre Emsenhuber Date: Wed, 7 Nov 2012 22:08:56 +0000 (+0100) Subject: Define $wgAlwaysUseTidy to false where needed in unit tests X-Git-Tag: 1.31.0-rc.0~21688^2 X-Git-Url: https://git.cyclocoop.org/%7B%24www_url%7Dadmin/compta/banques/ajouter.php?a=commitdiff_plain;h=d1be0a802ef5324f79f959c6a419fe96fb8522e2;p=lhc%2Fweb%2Fwiklou.git Define $wgAlwaysUseTidy to false where needed in unit tests Tidy changes some whitespaces in the HTML which breaks the tests if enabled. Change-Id: Ib44f60c0d4b595c76c258b41962c3c45ca21ac3e --- diff --git a/tests/phpunit/includes/content/TextContentTest.php b/tests/phpunit/includes/content/TextContentTest.php index 337945db53..52e168b3ff 100644 --- a/tests/phpunit/includes/content/TextContentTest.php +++ b/tests/phpunit/includes/content/TextContentTest.php @@ -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() ); diff --git a/tests/phpunit/includes/parser/TagHooksTest.php b/tests/phpunit/includes/parser/TagHooksTest.php index d089affced..292f13ad1a 100644 --- a/tests/phpunit/includes/parser/TagHooksTest.php +++ b/tests/phpunit/includes/parser/TagHooksTest.php @@ -12,7 +12,13 @@ class TagHookTest extends MediaWikiTestCase { public static function provideBadNames() { return array( array( "foobar" ), array( "foo\nbar" ), array( "foo\rbar" ) ); } - + + protected function setUp() { + parent::setUp(); + + $this->setMwGlobals( 'wgAlwaysUseTidy', false ); + } + /** * @dataProvider provideValidNames */