From 979ebc51895953436b3bd8e1e41dce63abab7a53 Mon Sep 17 00:00:00 2001 From: Antoine Musso Date: Sun, 6 Feb 2011 21:23:12 +0000 Subject: [PATCH] Tests for Xml::DateMenu() --- tests/phpunit/includes/XmlTest.php | 37 ++++++++++++++++++++++++++++++ 1 file changed, 37 insertions(+) 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 # -- 2.20.1