diff --git a/src/Util/PHP/Default.php b/src/Util/PHP/Default.php index f8b5714e5e4..e9649b66192 100644 --- a/src/Util/PHP/Default.php +++ b/src/Util/PHP/Default.php @@ -30,9 +30,14 @@ class PHPUnit_Util_PHP_Default extends PHPUnit_Util_PHP public function runJob($job, array $settings = array()) { $runtime = new Runtime; + $runtime = $runtime->getBinary() . $this->settingsToParameters($settings); + + if ('phpdbg' === PHP_SAPI) { + $runtime .= ' -qrr '.escapeshellarg(__DIR__ . '/eval-stdin.php'); + } $process = proc_open( - $runtime->getBinary() . $this->settingsToParameters($settings), + $runtime, array( 0 => array('pipe', 'r'), 1 => array('pipe', 'w'), diff --git a/src/Util/PHP/eval-stdin.php b/src/Util/PHP/eval-stdin.php new file mode 100644 index 00000000000..afba6b2e84b --- /dev/null +++ b/src/Util/PHP/eval-stdin.php @@ -0,0 +1,3 @@ +'.file_get_contents('php://input'));