From: Antoine Musso Date: Sun, 6 Feb 2011 21:23:12 +0000 (+0000) Subject: Tests for Xml::DateMenu() X-Git-Tag: 1.31.0-rc.0~32157 X-Git-Url: http://git.cyclocoop.org/%28?a=commitdiff_plain;h=979ebc51895953436b3bd8e1e41dce63abab7a53;p=lhc%2Fweb%2Fwiklou.git Tests for Xml::DateMenu() --- diff --git a/tests/phpunit/includes/XmlTest.php b/tests/phpunit/includes/XmlTest.php index 4f38a37eb6..080d88731d 100644 --- a/tests/phpunit/includes/XmlTest.php +++ b/tests/phpunit/includes/XmlTest.php @@ -73,6 +73,43 @@ class XmlTest extends MediaWikiTestCase { $this->assertEquals( '', Xml::closeElement( 'element' ), 'closeElement() shortcut' ); } + public function testDateMenu( ) { + $this->assertEquals( + ' ', + Xml::dateMenu( 2011, 02 ), + "Date menu for february 2011" + ); + $this->assertEquals( + ' ', + Xml::dateMenu( 2011, -1), + "Date menu with negative month for 'All'" + ); + } + # # textarea #