Index: trunk/extensions/DonationInterface/tests/TestHelper.php |
— | — | @@ -27,6 +27,10 @@ |
28 | 28 | */ |
29 | 29 | error_reporting( E_ALL | E_STRICT ); |
30 | 30 | |
| 31 | +if ( !defined( 'MEDIAWIKI' ) ) { |
| 32 | + define( 'MEDIAWIKI', 1 ); |
| 33 | +} |
| 34 | + |
31 | 35 | /** |
32 | 36 | * TESTS_WEB_ROOT |
33 | 37 | * |
— | — | @@ -39,6 +43,9 @@ |
40 | 44 | /* |
41 | 45 | * Required files for unit testing. |
42 | 46 | */ |
| 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' ); |
43 | 50 | require_once( TESTS_WEB_ROOT . '/includes/SpecialPage.php' ); |
44 | 51 | require_once( TESTS_WEB_ROOT . '/includes/Title.php' ); |
45 | 52 | require_once( TESTS_WEB_ROOT . '/includes/Exception.php' ); |
— | — | @@ -74,10 +81,6 @@ |
75 | 82 | require_once dirname( dirname( dirname( __FILE__ ) ) ) . DIRECTORY_SEPARATOR . 'ContributionTracking/ContributionTracking.processor.php'; |
76 | 83 | |
77 | 84 | |
78 | | -if ( !defined( 'MEDIAWIKI' ) ) { |
79 | | - define( 'MEDIAWIKI', 1 ); |
80 | | -} |
81 | | - |
82 | 85 | /* |
83 | 86 | * Unit tests are run from the command line. |
84 | 87 | * |
— | — | @@ -109,8 +112,6 @@ |
110 | 113 | * |
111 | 114 | * These files need to be required after the above code. Do not move. |
112 | 115 | */ |
113 | | -require_once( TESTS_WEB_ROOT . '/includes/Defines.php' ); |
114 | | -require_once( TESTS_WEB_ROOT . '/LocalSettings.php' ); |
115 | 116 | require_once( TESTS_WEB_ROOT . '/includes/WebRequest.php' ); |
116 | 117 | require_once( TESTS_WEB_ROOT . '/includes/GlobalFunctions.php' ); |
117 | 118 | require_once( TESTS_WEB_ROOT . '/includes/HttpFunctions.php' ); |