From: Platonides Date: Tue, 19 Jul 2011 21:38:28 +0000 (+0000) Subject: Follow up r91419. A boolean attribute can be both the empty string and its name ... X-Git-Tag: 1.31.0-rc.0~28732 X-Git-Url: http://git.cyclocoop.org//%27%40script%40/%27?a=commitdiff_plain;h=a2251d34f94aaa1211fb18e099f78e9743d58215;p=lhc%2Fweb%2Fwiklou.git Follow up r91419. A boolean attribute can be both the empty string and its name [whatwg.org/specs/web-apps/current-work/multipage/common-microsyntaxes.html#boolean-attributes] We use the later since that's what xhtml1 required [http://www.w3.org/TR/xhtml1/#h-4.5]. --- diff --git a/tests/phpunit/includes/HtmlTest.php b/tests/phpunit/includes/HtmlTest.php index 96bb180392..c0b48574f2 100644 --- a/tests/phpunit/includes/HtmlTest.php +++ b/tests/phpunit/includes/HtmlTest.php @@ -47,14 +47,13 @@ class HtmlTest extends MediaWikiTestCase { 'Boolean attributes do not generates output when value is null' ); - ### FIXME: maybe they should just output 'selected' $this->AssertEquals( - ' selected=""', + ' selected="selected"', Html::expandAttributes( array( 'selected'=>true ) ), 'Boolean attributes skip value output' ); $this->AssertEquals( - ' selected=""', + ' selected="selected"', Html::expandAttributes( array( 'selected' ) ), 'Boolean attributes (ex: selected) do not need a value' );