r108927 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r108926‎ | r108927 | r108928 >
Date:17:51, 14 January 2012
Author:amire80
Status:resolved (Comments)
Tags:
Comment:
Changing the failure message to something more meaningful.
Modified paths:
  • /trunk/phase3/tests/phpunit/MediaWikiLangTestCase.php (modified) (history)

Diff [purge]

Index: trunk/phase3/tests/phpunit/MediaWikiLangTestCase.php
@@ -13,7 +13,9 @@
1414 self::$oldLang = $wgLang;
1515 self::$oldContLang = $wgContLang;
1616
17 - if( $wgLanguageCode != $wgContLang->getCode() ) die("nooo!");
 17+ if( $wgLanguageCode != $wgContLang->getCode() ) {
 18+ die("Fatal error in MediaWikiLangTestCase::setUp(): \$wgLanguageCode: $wgLanguageCode; \$wgContLang->getCode(): " . $wgContLang->getCode());
 19+ }
1820
1921 $wgLanguageCode = 'en'; # For mainpage to be 'Main Page'
2022

Follow-up revisions

RevisionCommit summaryAuthorDate
r108939Follow up to r108927. Replaced die() with throw new MWException(), according ...amire8020:26, 14 January 2012

Comments

#Comment by 😂 (talk | contribs)   18:04, 14 January 2012

We shouldn't be dying in a testcase anyway. Throwing an exception would be cleaner.

#Comment by Amire80 (talk | contribs)   20:27, 14 January 2012

Addressed in r108939.

Status & tagging log