Fix broken tests for Xml.

Change-Id: Ifd7008269cc960004676ba79449911d63476615c
This commit is contained in:
Tim Landscheidt 2012-09-22 02:10:56 +00:00
parent 9b61a73fa6
commit 60d119c6e2

View file

@ -112,9 +112,6 @@ class XmlTest extends MediaWikiTestCase {
$this->assertEquals( '</element>', Xml::closeElement( 'element' ), 'closeElement() shortcut' );
}
/**
* @group Broken
*/
public function testDateMenu( ) {
$curYear = intval(gmdate('Y'));
$prevYear = $curYear - 1;
@ -126,7 +123,7 @@ class XmlTest extends MediaWikiTestCase {
if( $nextMonth == 13 ) { $nextMonth = 1; }
$this->assertEquals(
'<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" .
'<label for="year">From year (and earlier):</label> <input id="year" maxlength="4" size="7" type="number" value="2011" name="year" /> <label for="month">From month (and earlier):</label> <select id="month" name="month" class="mw-month-selector"><option value="-1">all</option>' . "\n" .
'<option value="1">January</option>' . "\n" .
'<option value="2" selected="">February</option>' . "\n" .
'<option value="3">March</option>' . "\n" .
@ -143,7 +140,7 @@ class XmlTest extends MediaWikiTestCase {
"Date menu for february 2011"
);
$this->assertEquals(
'<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" .
'<label for="year">From year (and earlier):</label> <input id="year" maxlength="4" size="7" type="number" value="2011" name="year" /> <label for="month">From month (and earlier):</label> <select id="month" name="month" class="mw-month-selector"><option value="-1">all</option>' . "\n" .
'<option value="1">January</option>' . "\n" .
'<option value="2">February</option>' . "\n" .
'<option value="3">March</option>' . "\n" .
@ -173,9 +170,8 @@ class XmlTest extends MediaWikiTestCase {
"Date menu next month is 11 months ago"
);
# @todo FIXME: Please note there is no year there!
$this->assertEquals(
'<label for="year">From year (and earlier):</label> <input name="year" size="4" value="" 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" .
'<label for="year">From year (and earlier):</label> <input id="year" maxlength="4" size="7" type="number" name="year" /> <label for="month">From month (and earlier):</label> <select id="month" name="month" class="mw-month-selector"><option value="-1">all</option>' . "\n" .
'<option value="1">January</option>' . "\n" .
'<option value="2">February</option>' . "\n" .
'<option value="3">March</option>' . "\n" .