Change-Id: Ic175c1457e7f76a2b5232a2b5d3563c5982cfee2
wfProfileOut( __METHOD__ );
- // Return to real wiki db, so profiling data is preserved
- MediaWikiTestCase::teardownTestDB();
-
- // Log profiling data, e.g. in the database or UDP
- wfLogProfilingData();
-
if ( $exit ) {
exit( $ret );
} else {
EOF;
require_once __DIR__ . "/phpunit.php";
}
+
+class MediaWikiPHPUnitBootstrap {
+
+ public function __destruct() {
+ // Return to real wiki db, so profiling data is preserved
+ MediaWikiTestCase::teardownTestDB();
+
+ // Log profiling data, e.g. in the database or UDP
+ wfLogProfilingData();
+ }
+
+}
+
+// This will be destructed after all tests have been run
+$mediawikiPHPUnitBootstrap = new MediaWikiPHPUnitBootstrap();