From 7fadfb3734b38667926649da1613911eba3a0bd4 Mon Sep 17 00:00:00 2001 From: Joe Watkins Date: Mon, 22 Apr 2019 09:07:40 +0200 Subject: [PATCH] Fetch settings for XDebug or PCOV from Runtime --- src/Util/PHP/AbstractPhpProcess.php | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/src/Util/PHP/AbstractPhpProcess.php b/src/Util/PHP/AbstractPhpProcess.php index c88e362b773..e2263ce16ad 100644 --- a/src/Util/PHP/AbstractPhpProcess.php +++ b/src/Util/PHP/AbstractPhpProcess.php @@ -177,6 +177,17 @@ public function runTestJob(string $job, Test $test, TestResult $result): void public function getCommand(array $settings, string $file = null): string { $command = $this->runtime->getBinary(); + + if ($this->runtime->hasPCOV()) { + $pcov = $this->runtime->getCurrentSettings( + \array_keys(\ini_get_all("pcov"))); + $settings = \array_merge($settings, $pcov); + } else if ($this->runtime->hasXdebug()) { + $xdebug = $this->runtime->getCurrentSettings( + \array_keys(\ini_get_all("xdebug"))); + $settings = \array_merge($settings, $xdebug); + } + $command .= $this->settingsToParameters($settings); if (\PHP_SAPI === 'phpdbg') {