MediaWiki
REL1_24
|
00001 <?php 00009 if ( !defined( 'MW_PHPUNIT_TEST' ) ) { 00010 echo <<<EOF 00011 You are running these tests directly from phpunit. You may not have all globals correctly set. 00012 Running phpunit.php instead is recommended. 00013 EOF; 00014 require_once __DIR__ . "/phpunit.php"; 00015 } 00016 00017 class MediaWikiPHPUnitBootstrap { 00018 00019 public function __construct() { 00020 wfProfileIn( __CLASS__ ); 00021 } 00022 00023 public function __destruct() { 00024 wfProfileOut( __CLASS__ ); 00025 00026 // Return to real wiki db, so profiling data is preserved 00027 MediaWikiTestCase::teardownTestDB(); 00028 00029 // Log profiling data, e.g. in the database or UDP 00030 wfLogProfilingData(); 00031 } 00032 00033 } 00034 00035 // This will be destructed after all tests have been run 00036 $mediawikiPHPUnitBootstrap = new MediaWikiPHPUnitBootstrap();