r100728 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r100727‎ | r100728 | r100729 >
Date:18:57, 25 October 2011
Author:jpostlethwaite
Status:deferred
Tags:fundraising 
Comment:
Added require for /includes/DefaultSettings.php. Reordered statements in helper.
Modified paths:
  • /trunk/extensions/DonationInterface/tests/TestHelper.php (modified) (history)

Diff [purge]

Index: trunk/extensions/DonationInterface/tests/TestHelper.php
@@ -27,6 +27,10 @@
2828 */
2929 error_reporting( E_ALL | E_STRICT );
3030
 31+if ( !defined( 'MEDIAWIKI' ) ) {
 32+ define( 'MEDIAWIKI', 1 );
 33+}
 34+
3135 /**
3236 * TESTS_WEB_ROOT
3337 *
@@ -39,6 +43,9 @@
4044 /*
4145 * Required files for unit testing.
4246 */
 47+require_once( TESTS_WEB_ROOT . '/includes/Defines.php' );
 48+require_once( TESTS_WEB_ROOT . '/includes/DefaultSettings.php' );
 49+require_once( TESTS_WEB_ROOT . '/LocalSettings.php' );
4350 require_once( TESTS_WEB_ROOT . '/includes/SpecialPage.php' );
4451 require_once( TESTS_WEB_ROOT . '/includes/Title.php' );
4552 require_once( TESTS_WEB_ROOT . '/includes/Exception.php' );
@@ -74,10 +81,6 @@
7582 require_once dirname( dirname( dirname( __FILE__ ) ) ) . DIRECTORY_SEPARATOR . 'ContributionTracking/ContributionTracking.processor.php';
7683
7784
78 -if ( !defined( 'MEDIAWIKI' ) ) {
79 - define( 'MEDIAWIKI', 1 );
80 -}
81 -
8285 /*
8386 * Unit tests are run from the command line.
8487 *
@@ -109,8 +112,6 @@
110113 *
111114 * These files need to be required after the above code. Do not move.
112115 */
113 -require_once( TESTS_WEB_ROOT . '/includes/Defines.php' );
114 -require_once( TESTS_WEB_ROOT . '/LocalSettings.php' );
115116 require_once( TESTS_WEB_ROOT . '/includes/WebRequest.php' );
116117 require_once( TESTS_WEB_ROOT . '/includes/GlobalFunctions.php' );
117118 require_once( TESTS_WEB_ROOT . '/includes/HttpFunctions.php' );

Status & tagging log