From: Alexandre Emsenhuber Date: Sun, 23 Sep 2012 08:15:20 +0000 (+0200) Subject: Follow-up Ifd700826 (60d119c), address a fixme in a re-enabled test. X-Git-Tag: 1.31.0-rc.0~22303^2 X-Git-Url: http://git.cyclocoop.org/%7B%24www_url%7Dadmin/compta/operations/?a=commitdiff_plain;h=3beaa0a027612a62030b4d969a05b744c0388e2b;p=lhc%2Fweb%2Fwiklou.git Follow-up Ifd700826 (60d119c), address a fixme in a re-enabled test. Make the "Date menu next month is 11 months ago" also work when the current month is december. Change-Id: Ie7b998bf962abbb3e2f789a3d8a9af8c52e7feaa --- diff --git a/tests/phpunit/includes/XmlTest.php b/tests/phpunit/includes/XmlTest.php index 562c6878cf..7f25f58147 100644 --- a/tests/phpunit/includes/XmlTest.php +++ b/tests/phpunit/includes/XmlTest.php @@ -37,7 +37,7 @@ class XmlTest extends MediaWikiTestCase { public function tearDown() { global $wgLang, $wgContLang; $wgLang = self::$oldLang; - + $wgContLang->setNamespaces( self::$oldNamespaces ); } @@ -162,10 +162,9 @@ class XmlTest extends MediaWikiTestCase { "Date menu year is the current one when not specified" ); - // @todo FIXME: next month can be in the next year - // test failing because it is now december + $wantedYear = $nextMonth == 1 ? $curYear : $prevYear; $this->assertEquals( - Xml::dateMenu( $prevYear, $nextMonth ), + Xml::dateMenu( $wantedYear, $nextMonth ), Xml::dateMenu( '', $nextMonth ), "Date menu next month is 11 months ago" );