X-Git-Url: https://git.heureux-cyclage.org/?a=blobdiff_plain;f=tests%2Fphpunit%2Fbootstrap.php;h=a5c8ef61c43f95be8c820a5062ffaedb99ee67a4;hb=0db2e1821674881661c134ea8f28ded2385a8df0;hp=d929b79d1ed78d8886e57b090f0d084fb307983d;hpb=59183f670a9e60975632414b25b05f16edf06485;p=lhc%2Fweb%2Fwiklou.git diff --git a/tests/phpunit/bootstrap.php b/tests/phpunit/bootstrap.php index d929b79d1e..a5c8ef61c4 100644 --- a/tests/phpunit/bootstrap.php +++ b/tests/phpunit/bootstrap.php @@ -13,3 +13,17 @@ Running phpunit.php instead is recommended. 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();