diff --git a/plugins/TestRunner/Commands/TestsRun.php b/plugins/TestRunner/Commands/TestsRun.php index 0aaef900496..e7b02512b39 100644 --- a/plugins/TestRunner/Commands/TestsRun.php +++ b/plugins/TestRunner/Commands/TestsRun.php @@ -47,7 +47,11 @@ protected function execute(InputInterface $input, OutputInterface $output) $command = '../../vendor/phpunit/phpunit/phpunit'; if (!$this->isCoverageEnabled($options) && $this->isXdebugLoaded()) { - $output->writeln('Did you know? You can run tests faster by disabling xdebug'); + $message = 'Did you know? You can run tests faster by disabling xdebug'; + if($this->isXdebugCodeCoverageEnabled()) { + $message .= ' (if you need xdebug, speed up tests by setting xdebug.coverage_enable=0)'; + } + $output->writeln('' . $message .''); } // force xdebug usage for coverage options @@ -255,6 +259,11 @@ private function isXdebugLoaded() return extension_loaded('xdebug'); } + private function isXdebugCodeCoverageEnabled() + { + return (bool)ini_get('xdebug.coverage_enable'); + } + private function fixPathToTestFileOrDirectory($testFile) { if ('/' !== substr($testFile, 0, 1)) {