Test for r67549 (bug 23797)
authorAntoine Musso <hashar@users.mediawiki.org>
Sat, 6 Nov 2010 22:43:55 +0000 (22:43 +0000)
committerAntoine Musso <hashar@users.mediawiki.org>
Sat, 6 Nov 2010 22:43:55 +0000 (22:43 +0000)
maintenance/tests/phpunit/includes/XmlTest.php

index a91799c..27be6ba 100644 (file)
@@ -32,6 +32,13 @@ class XmlTest extends PHPUnit_Framework_TestCase {
                );
        }
 
+       function testElementInputCanHaveAValueOfZero() {
+               $this->assertEquals(
+                       '<input name="name" value="0" />',
+                       Xml::input( 'name', false, 0 ),
+                       'Input with a value of 0 (bug 23797)'
+               );
+       }
        function testElementEscaping() {
                $this->assertEquals(
                        '<element>hello &lt;there&gt; you &amp; you</element>',