Merge "mediawiki.searchSuggest: Show full article title as a tooltip for each suggestion"
[lhc/web/wiklou.git] / tests / phpunit / includes / XmlTest.php
index 8205029..382e3d8 100644 (file)
@@ -144,17 +144,18 @@ class XmlTest extends MediaWikiTestCase {
                $prevYear = $curYear - 1;
 
                $curMonth = intval( gmdate( 'n' ) );
-               $prevMonth = $curMonth - 1;
-               if ( $prevMonth == 0 ) {
-                       $prevMonth = 12;
-               }
+
                $nextMonth = $curMonth + 1;
                if ( $nextMonth == 13 ) {
                        $nextMonth = 1;
                }
 
                $this->assertEquals(
-                       '<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" .
+                       '<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" .
@@ -171,7 +172,11 @@ class XmlTest extends MediaWikiTestCase {
                        "Date menu for february 2011"
                );
                $this->assertEquals(
-                       '<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" .
+                       '<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" .
@@ -201,7 +206,11 @@ class XmlTest extends MediaWikiTestCase {
                );
 
                $this->assertEquals(
-                       '<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" .
+                       '<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" .