From: addshore Date: Mon, 5 May 2014 12:53:26 +0000 (+0100) Subject: Move profile In/OUT call out of MWPHPUnitCommand X-Git-Tag: 1.31.0-rc.0~15868^2 X-Git-Url: https://git.cyclocoop.org/%28%28?a=commitdiff_plain;h=9d69b15958643748c7ab72d9ff53fa955041ea8a;p=lhc%2Fweb%2Fwiklou.git Move profile In/OUT call out of MWPHPUnitCommand Change-Id: I710fddc20e88745c9091432dff87b5e361c1f71a --- diff --git a/tests/phpunit/MediaWikiPHPUnitCommand.php b/tests/phpunit/MediaWikiPHPUnitCommand.php index 9f24835c2c..fa863fc57f 100644 --- a/tests/phpunit/MediaWikiPHPUnitCommand.php +++ b/tests/phpunit/MediaWikiPHPUnitCommand.php @@ -52,20 +52,6 @@ class MediaWikiPHPUnitCommand extends PHPUnit_TextUI_Command { } } - public function run( array $argv, $exit = true ) { - wfProfileIn( __METHOD__ ); - - $ret = parent::run( $argv, false ); - - wfProfileOut( __METHOD__ ); - - if ( $exit ) { - exit( $ret ); - } else { - return $ret; - } - } - public function showHelp() { parent::showHelp(); diff --git a/tests/phpunit/bootstrap.php b/tests/phpunit/bootstrap.php index 573a91a03d..121aade91b 100644 --- a/tests/phpunit/bootstrap.php +++ b/tests/phpunit/bootstrap.php @@ -16,7 +16,13 @@ EOF; class MediaWikiPHPUnitBootstrap { + public function __construct() { + wfProfileIn( __CLASS__ ); + } + public function __destruct() { + wfProfileOut( __CLASS__ ); + // Return to real wiki db, so profiling data is preserved MediaWikiTestCase::teardownTestDB();