Index: trunk/phase3/tests/phpunit/includes/HtmlTest.php |
— | — | @@ -36,6 +36,7 @@ |
37 | 37 | } |
38 | 38 | |
39 | 39 | public function testExpandAttributesForBooleans() { |
| 40 | + global $wgHtml5; |
40 | 41 | $this->AssertEquals( |
41 | 42 | '', |
42 | 43 | Html::expandAttributes( array( 'selected'=>false) ), |
— | — | @@ -48,12 +49,12 @@ |
49 | 50 | ); |
50 | 51 | |
51 | 52 | $this->AssertEquals( |
52 | | - ' selected="selected"', |
| 53 | + $wgHtml5 ? ' selected=""' : ' selected="selected"', |
53 | 54 | Html::expandAttributes( array( 'selected'=>true ) ), |
54 | 55 | 'Boolean attributes skip value output' |
55 | 56 | ); |
56 | 57 | $this->AssertEquals( |
57 | | - ' selected="selected"', |
| 58 | + $wgHtml5 ? ' selected=""' : ' selected="selected"', |
58 | 59 | Html::expandAttributes( array( 'selected' ) ), |
59 | 60 | 'Boolean attributes (ex: selected) do not need a value' |
60 | 61 | ); |