From: Platonides Date: Tue, 19 Jul 2011 22:10:05 +0000 (+0000) Subject: Follow-up r92588. Make it work regardless of $wgHtml5 X-Git-Tag: 1.31.0-rc.0~28730 X-Git-Url: http://git.cyclocoop.org/%22.%28%24lien.?a=commitdiff_plain;h=a326e60e48f2e822200b7a81681f53a460925fc8;p=lhc%2Fweb%2Fwiklou.git Follow-up r92588. Make it work regardless of $wgHtml5 --- diff --git a/tests/phpunit/includes/HtmlTest.php b/tests/phpunit/includes/HtmlTest.php index c0b48574f2..b38ae18afc 100644 --- a/tests/phpunit/includes/HtmlTest.php +++ b/tests/phpunit/includes/HtmlTest.php @@ -36,6 +36,7 @@ class HtmlTest extends MediaWikiTestCase { } public function testExpandAttributesForBooleans() { + global $wgHtml5; $this->AssertEquals( '', Html::expandAttributes( array( 'selected'=>false) ), @@ -48,12 +49,12 @@ class HtmlTest extends MediaWikiTestCase { ); $this->AssertEquals( - ' selected="selected"', + $wgHtml5 ? ' selected=""' : ' selected="selected"', Html::expandAttributes( array( 'selected'=>true ) ), 'Boolean attributes skip value output' ); $this->AssertEquals( - ' selected="selected"', + $wgHtml5 ? ' selected=""' : ' selected="selected"', Html::expandAttributes( array( 'selected' ) ), 'Boolean attributes (ex: selected) do not need a value' );