From 9d69b15958643748c7ab72d9ff53fa955041ea8a Mon Sep 17 00:00:00 2001 From: addshore Date: Mon, 5 May 2014 13:53:26 +0100 Subject: [PATCH] Move profile In/OUT call out of MWPHPUnitCommand Change-Id: I710fddc20e88745c9091432dff87b5e361c1f71a --- tests/phpunit/MediaWikiPHPUnitCommand.php | 14 -------------- tests/phpunit/bootstrap.php | 6 ++++++ 2 files changed, 6 insertions(+), 14 deletions(-) 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(); -- 2.20.1