1
0
Fork 0

Fix functional tests to use the same PHP version as PHPUnit runs with

pull/9734/head
Jordi Boggiano 2021-03-09 09:54:06 +01:00
parent 4f47a4c667
commit 0879e80d56
No known key found for this signature in database
GPG Key ID: 7BBD42C429EC80BC
1 changed files with 2 additions and 2 deletions

View File

@ -78,7 +78,7 @@ class AllFunctionalTest extends TestCase
} }
} }
$proc = new Process('php -dphar.readonly=0 '.escapeshellarg('./bin/compile'), $target); $proc = new Process((defined('PHP_BINARY') ? escapeshellcmd(PHP_BINARY) : 'php').' -dphar.readonly=0 '.escapeshellarg('./bin/compile'), $target);
$exitcode = $proc->run(); $exitcode = $proc->run();
if ($exitcode !== 0 || trim($proc->getOutput())) { if ($exitcode !== 0 || trim($proc->getOutput())) {
@ -110,7 +110,7 @@ class AllFunctionalTest extends TestCase
'COMPOSER_CACHE_DIR' => $this->testDir.'cache', 'COMPOSER_CACHE_DIR' => $this->testDir.'cache',
); );
$cmd = 'php '.escapeshellarg(self::$pharPath).' --no-ansi '.$testData['RUN']; $cmd = (defined('PHP_BINARY') ? escapeshellcmd(PHP_BINARY) : 'php') .' '.escapeshellarg(self::$pharPath).' --no-ansi '.$testData['RUN'];
$proc = new Process($cmd, $this->testDir, $env, null, 300); $proc = new Process($cmd, $this->testDir, $env, null, 300);
$output = ''; $output = '';