r90150 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r90149‎ | r90150 | r90151 >
Date:20:51, 15 June 2011
Author:brion
Status:ok (Comments)
Tags:
Comment:
Followup to r90090 -- thou shalt add parent:: calls to both overridden tearDown *and* overridden setUp ()


Had been resulting in fatal errors when running TimeAdjustTest, due to trying to use an old $wgContLang value that had never gotten saved properly because the parent class setUp() was not called.
Modified paths:
  • /trunk/phase3/tests/phpunit/includes/TimeAdjustTest.php (modified) (history)

Diff [purge]

Index: trunk/phase3/tests/phpunit/includes/TimeAdjustTest.php
@@ -4,6 +4,7 @@
55 static $offset;
66
77 public function setUp() {
 8+ parent::setUp();
89 global $wgLocalTZoffset;
910 self::$offset = $wgLocalTZoffset;
1011

Follow-up revisions

RevisionCommit summaryAuthorDate
r90155Follow-up r90150, another parent::setUp missing.platonides21:03, 15 June 2011
r90157Make sure to die if there are more MediaWikiLangTestCase::tearDowns than setU...platonides21:07, 15 June 2011

Past revisions this follows-up on

RevisionCommit summaryAuthorDate
r90090Thou shall call parent::tearDown(), MediaWikiLangTestCase child....platonides21:21, 14 June 2011

Comments

#Comment by Platonides (talk | contribs)   20:56, 15 June 2011

Well said. I had only tested it in the testing batch.

Status & tagging log