From a326e60e48f2e822200b7a81681f53a460925fc8 Mon Sep 17 00:00:00 2001 From: Platonides Date: Tue, 19 Jul 2011 22:10:05 +0000 Subject: [PATCH] Follow-up r92588. Make it work regardless of $wgHtml5 --- tests/phpunit/includes/HtmlTest.php | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) 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' ); -- 2.20.1