r108939 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r108938‎ | r108939 | r108940 >
Date:20:26, 14 January 2012
Author:amire80
Status:ok
Tags:
Comment:
Follow up to r108927. Replaced die() with throw new MWException(), according to ^demon's suggestion.
Modified paths:
  • /trunk/phase3/tests/phpunit/MediaWikiLangTestCase.php (modified) (history)

Diff [purge]

Index: trunk/phase3/tests/phpunit/MediaWikiLangTestCase.php
@@ -14,7 +14,9 @@
1515 self::$oldContLang = $wgContLang;
1616
1717 if( $wgLanguageCode != $wgContLang->getCode() ) {
18 - die("Fatal error in MediaWikiLangTestCase::setUp(): \$wgLanguageCode: $wgLanguageCode; \$wgContLang->getCode(): " . $wgContLang->getCode());
 18+ throw new MWException("Error in MediaWikiLangTestCase::setUp(): " .
 19+ "\$wgLanguageCode ('$wgLanguageCode') is different from " .
 20+ "\$wgContLang->getCode() (" . $wgContLang->getCode() . ")" );
1921 }
2022
2123 $wgLanguageCode = 'en'; # For mainpage to be 'Main Page'

Past revisions this follows-up on

RevisionCommit summaryAuthorDate
r108927Changing the failure message to something more meaningful.amire8017:51, 14 January 2012

Status & tagging log