Index: trunk/phase3/tests/bootstrap.php |
— | — | @@ -1,16 +1,24 @@ |
2 | 2 | <?php |
3 | 3 | |
| 4 | +/** |
| 5 | + * Set up the MediaWiki environment when running tests with "phpunit" command |
| 6 | + * |
| 7 | + * Warning: this file is not included from global scope! |
| 8 | + * @file |
| 9 | + */ |
| 10 | + |
4 | 11 | global $wgCommandLineMode, $IP; |
5 | 12 | $wgCommandLineMode = true; |
6 | 13 | $IP = dirname( dirname( __FILE__ ) ); |
7 | | -define('MEDIAWIKI', 1); |
| 14 | + |
| 15 | +define( 'MEDIAWIKI', true ); |
| 16 | +define( 'MW_PHPUNIT_TEST', true ); |
8 | 17 | ini_set( 'include_path', "$IP:" .ini_get( 'include_path' ) ); |
9 | 18 | |
10 | | -require ( "$IP/includes/Defines.php" ); |
11 | | -require ( "$IP/includes/DefaultSettings.php" ); |
12 | | -require ( "$IP/LocalSettings.php" ); |
| 19 | +require "$IP/includes/Defines.php"; |
| 20 | +require "$IP/includes/AutoLoader.php"; |
| 21 | +require "$IP/LocalSettings.php"; |
13 | 22 | |
14 | | -require 'ProfilerStub.php'; |
15 | | -require 'GlobalFunctions.php'; |
16 | | -require 'Hooks.php'; |
17 | | -require 'AutoLoader.php'; |
| 23 | +require_once "$IP/includes/ProfilerStub.php"; |
| 24 | +require_once "$IP/includes/GlobalFunctions.php"; |
| 25 | +require_once "$IP/includes/Hooks.php"; |