Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/matomo-org/matomo.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--plugins/TestRunner/Commands/TestsRun.php11
1 files changed, 10 insertions, 1 deletions
diff --git a/plugins/TestRunner/Commands/TestsRun.php b/plugins/TestRunner/Commands/TestsRun.php
index 0aaef90049..e7b02512b3 100644
--- a/plugins/TestRunner/Commands/TestsRun.php
+++ b/plugins/TestRunner/Commands/TestsRun.php
@@ -47,7 +47,11 @@ class TestsRun extends ConsoleCommand
$command = '../../vendor/phpunit/phpunit/phpunit';
if (!$this->isCoverageEnabled($options) && $this->isXdebugLoaded()) {
- $output->writeln('<comment>Did you know? You can run tests faster by disabling xdebug</comment>');
+ $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)</comment>';
+ }
+ $output->writeln('<comment>' . $message .'</comment>');
}
// force xdebug usage for coverage options
@@ -255,6 +259,11 @@ class TestsRun extends ConsoleCommand
return extension_loaded('xdebug');
}
+ private function isXdebugCodeCoverageEnabled()
+ {
+ return (bool)ini_get('xdebug.coverage_enable');
+ }
+
private function fixPathToTestFileOrDirectory($testFile)
{
if ('/' !== substr($testFile, 0, 1)) {