r99306 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r99305‎ | r99306 | r99307 >
Date:11:58, 8 October 2011
Author:nikerabbit
Status:ok (Comments)
Tags:
Comment:
Followup r99305 - change tests to match behaviour. Would set globals but restoring them manually is just too laborious
Modified paths:
  • /trunk/phase3/tests/phpunit/includes/XmlSelectTest.php (modified) (history)
  • /trunk/phase3/tests/phpunit/includes/XmlTest.php (modified) (history)

Diff [purge]

Index: trunk/phase3/tests/phpunit/includes/XmlTest.php
@@ -102,7 +102,7 @@
103103 $this->assertEquals(
104104 '<label for="year">From year (and earlier):</label> <input name="year" size="4" value="2011" id="year" maxlength="4" /> <label for="month">From month (and earlier):</label> <select id="month" name="month" class="mw-month-selector"><option value="-1">all</option>' . "\n" .
105105 '<option value="1">January</option>' . "\n" .
106 -'<option value="2" selected="selected">February</option>' . "\n" .
 106+'<option value="2" selected="">February</option>' . "\n" .
107107 '<option value="3">March</option>' . "\n" .
108108 '<option value="4">April</option>' . "\n" .
109109 '<option value="5">May</option>' . "\n" .
Index: trunk/phase3/tests/phpunit/includes/XmlSelectTest.php
@@ -80,7 +80,7 @@
8181 $this->select->addOption( 'foo2' );
8282 $this->assertEquals(
8383 '<select><option value="foo1">foo1</option>' . "\n" .
84 -'<option value="bar1" selected="selected">bar1</option>' . "\n" .
 84+'<option value="bar1" selected="">bar1</option>' . "\n" .
8585 '<option value="foo2">foo2</option></select>', $this->select->getHTML() );
8686 }
8787
@@ -96,7 +96,7 @@
9797 $this->select->setDefault( 'bar1' ); # setting default after adding options
9898 $this->assertEquals(
9999 '<select><option value="foo1">foo1</option>' . "\n" .
100 -'<option value="bar1" selected="selected">bar1</option>' . "\n" .
 100+'<option value="bar1" selected="">bar1</option>' . "\n" .
101101 '<option value="foo2">foo2</option></select>', $this->select->getHTML() );
102102 }
103103

Past revisions this follows-up on

RevisionCommit summaryAuthorDate
r99305Small cleanups to XmlSelectnikerabbit11:41, 8 October 2011

Comments

#Comment by Krinkle (talk | contribs)   23:31, 9 October 2011

I'm assuming this is because Html:: honors wgHtml5 for boolean attribs and Xml::tags does not ?

Status & tagging log