Move profile In/OUT call out of MWPHPUnitCommand
authoraddshore <addshorewiki@gmail.com>
Mon, 5 May 2014 12:53:26 +0000 (13:53 +0100)
committerAddshore <addshorewiki@gmail.com>
Mon, 5 May 2014 12:55:56 +0000 (12:55 +0000)
Change-Id: I710fddc20e88745c9091432dff87b5e361c1f71a

tests/phpunit/MediaWikiPHPUnitCommand.php
tests/phpunit/bootstrap.php

index 9f24835..fa863fc 100644 (file)
@@ -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();
 
index 573a91a..121aade 100644 (file)
@@ -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();