Remove messages.inc, rebuildLanguage.php, writeMessagesArray.inc
[mediawiki.git] / tests / phpunit / bootstrap.php
blob121aade91b0b484bc642eb4666902f64d506574c
1 <?php
2 /**
3 * Bootstrapping for MediaWiki PHPUnit tests
4 * This file is included by phpunit and is NOT in the global scope.
6 * @file
7 */
9 if ( !defined( 'MW_PHPUNIT_TEST' ) ) {
10 echo <<<EOF
11 You are running these tests directly from phpunit. You may not have all globals correctly set.
12 Running phpunit.php instead is recommended.
13 EOF;
14 require_once __DIR__ . "/phpunit.php";
17 class MediaWikiPHPUnitBootstrap {
19 public function __construct() {
20 wfProfileIn( __CLASS__ );
23 public function __destruct() {
24 wfProfileOut( __CLASS__ );
26 // Return to real wiki db, so profiling data is preserved
27 MediaWikiTestCase::teardownTestDB();
29 // Log profiling data, e.g. in the database or UDP
30 wfLogProfilingData();
35 // This will be destructed after all tests have been run
36 $mediawikiPHPUnitBootstrap = new MediaWikiPHPUnitBootstrap();