4 * Bootstrapping for MediaWiki PHPUnit tests
11 // Evaluate the include path relative to this file
12 $IP = dirname( dirname( dirname( __FILE__
) ) );
14 // Set a flag which can be used to detect when other scripts have been entered through this entry point or not
15 define( 'MW_PHPUNIT_TEST', true );
17 $options = array( 'quiet' );
19 // Start up MediaWiki in command-line mode
20 require_once( "$IP/maintenance/commandLine.inc" );
22 // Assume UTC for testing purposes
23 $wgLocaltimezone = 'UTC';
25 require_once( 'PHPUnit/Runner/Version.php' );
26 if( version_compare( PHPUnit_Runner_Version
::id(), '3.5.0', '>=' ) ) {
27 # PHPUnit 3.5.0 introduced a nice autoloader based on class name
28 require_once( 'PHPUnit/Autoload.php' );
30 # Keep the old pre PHPUnit 3.5.0 behaviour for compatibility
31 require_once( 'PHPUnit/TextUI/Command.php' );
34 $additionalMWCLIArgs = array(
38 require_once( "$IP/tests/phpunit/MediaWikiPHPUnitCommand.php" );
39 MediaWikiPHPUnitCommand
::main();