r104812 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r104811‎ | r104812 | r104813 >
Date:00:40, 1 December 2011
Author:reedy
Status:resolved (Comments)
Tags:
Comment:
Comment out brokwn Xml::dateMenu() tests

Failing because it's december (ie the test is wrong)
Modified paths:
  • /branches/REL1_18/phase3/tests/phpunit/includes/XmlTest.php (modified) (history)
  • /trunk/phase3/tests/phpunit/includes/XmlTest.php (modified) (history)

Diff [purge]

Index: trunk/phase3/tests/phpunit/includes/XmlTest.php
@@ -5,12 +5,12 @@
66
77 public function setUp() {
88 global $wgLang, $wgLanguageCode;
9 -
 9+
1010 self::$oldLang = $wgLang;
1111 $wgLanguageCode = 'en';
1212 $wgLang = Language::factory( $wgLanguageCode );
1313 }
14 -
 14+
1515 public function tearDown() {
1616 global $wgLang, $wgLanguageCode;
1717 $wgLang = self::$oldLang;
@@ -138,11 +138,14 @@
139139 Xml::dateMenu( '' , $curMonth ),
140140 "Date menu year is the current one when not specified"
141141 );
142 - $this->assertEquals(
 142+
 143+ // @todo FIXME: next month can be in the next year
 144+ // test failing because it is now december
 145+ /*$this->assertEquals(
143146 Xml::dateMenu( $prevYear, $nextMonth ),
144147 Xml::dateMenu( '', $nextMonth ),
145148 "Date menu next month is 11 months ago"
146 - );
 149+ ); */
147150
148151 # @todo FIXME: Please note there is no year there!
149152 $this->assertEquals(
@@ -159,7 +162,7 @@
160163 '<option value="10">October</option>' . "\n" .
161164 '<option value="11">November</option>' . "\n" .
162165 '<option value="12">December</option></select>',
163 - Xml::dateMenu( '', ''),
 166+ Xml::dateMenu( '', '' ),
164167 "Date menu with neither year or month"
165168 );
166169 }
Index: branches/REL1_18/phase3/tests/phpunit/includes/XmlTest.php
@@ -138,11 +138,13 @@
139139 Xml::dateMenu( '' , $curMonth ),
140140 "Date menu year is the current one when not specified"
141141 );
142 - $this->assertEquals(
 142+ // @todo FIXME: next month can be in the next year
 143+ // test failing because it is now december
 144+ /*$this->assertEquals(
143145 Xml::dateMenu( $prevYear, $nextMonth ),
144146 Xml::dateMenu( '', $nextMonth ),
145147 "Date menu next month is 11 months ago"
146 - );
 148+ ); */
147149
148150 # @todo FIXME: Please note there is no year there!
149151 $this->assertEquals(

Follow-up revisions

RevisionCommit summaryAuthorDate
r104855Don't comment tests out, use $this->markTestIncomplete()...reedy14:40, 1 December 2011

Comments

#Comment by 😂 (talk | contribs)   13:40, 1 December 2011

Don't comment them out, then nobody knows to fix them. Instead put a markTestIncomplete("foo") right before the failure point.

Status & tagging log