[Html] Unit test + bugfix Html::namespaceSelector
authorKrinkle <krinkle@users.mediawiki.org>
Wed, 25 Jan 2012 03:25:54 +0000 (03:25 +0000)
committerKrinkle <krinkle@users.mediawiki.org>
Wed, 25 Jan 2012 03:25:54 +0000 (03:25 +0000)
commit3c9d05055b29c858aa1d89089fb52e3b60869b12
treeadfd72954d7da0b815469b08f3aad3b061164a80
parent11b0b2e7d3481a42ac6c79b169d01fb51a186426
[Html] Unit test + bugfix Html::namespaceSelector
* Previously it was passing $selectAttribs['name'] to Xml::label, which uses its value for the <label for=""> attribute. This works as long as $selectAttribs['id'] and $selectAttribs['name'] match, but when they don't it fails. <label for=""> always corresponds with <{input,text area,select} id=""> in browsers, never with "name".
* Make name/id match eachother by default to avoid backwards compatibility breakages (they used to match in the Xml class method as well)
* Add HtmlTest.php entries similar to the ones in XmlTest
* Fix E_NOTICE about $params['selected'], default to ''

-- Follows-up r109974, r109698, r109990
-- Bug originally introduced in r41425
-- XmlTest.php still runs successfully
-- HtmlTest.php runs successfully
includes/Html.php
tests/phpunit/includes/HtmlTest.php
tests/phpunit/includes/XmlTest.php