Skip to content

Commit

Permalink
Fetch settings for XDebug or PCOV from Runtime
Browse files Browse the repository at this point in the history
  • Loading branch information
krakjoe authored and sebastianbergmann committed Apr 25, 2019
1 parent 21ee615 commit a547637
Showing 1 changed file with 11 additions and 0 deletions.
11 changes: 11 additions & 0 deletions src/Util/PHP/AbstractPhpProcess.php
Expand Up @@ -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') {
Expand Down

0 comments on commit a547637

Please sign in to comment.