Skip to content

Commit e216cf6

Browse files
orlitzkyGirgias
authored andcommitted
ext/soap/tests/bugs/bug62900.phpt: make use of TEST_PHP_ vars
This test goes to some trouble to ensure that it uses the config of the just-built (often development) PHP rather than the system one. There already exist environment variables to facilitate this however -- TEST_PHP_EXECUTABLE and TEST_PHP_EXTRA_ARGS -- so let's use them. Closes GH-22405
1 parent 1750656 commit e216cf6

1 file changed

Lines changed: 4 additions & 7 deletions

File tree

‎ext/soap/tests/bugs/bug62900.phpt‎

Lines changed: 4 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -46,18 +46,15 @@ $combinations = [
4646

4747
chdir(__DIR__);
4848

49-
$args = ["-d", "display_startup_errors=0", "-d", "extension_dir=" . ini_get("extension_dir"), "-d", "extension=" . (substr(PHP_OS, 0, 3) == "WIN" ? "php_" : "") . "soap." . PHP_SHLIB_SUFFIX];
50-
if (php_ini_loaded_file()) {
51-
// Necessary such that it works from a development directory in which case extension_dir might not be the real extension dir
52-
$args[] = "-c";
53-
$args[] = php_ini_loaded_file();
54-
}
49+
$php = getenv('TEST_PHP_EXECUTABLE');
50+
$args = getenv('TEST_PHP_EXTRA_ARGS');
51+
$cmd = "$php $args " . __DIR__ . '/bug62900_run';
5552

5653
foreach ($combinations as list($wsdl, $xsd)) {
5754
file_put_contents(__DIR__."/bug62900.wsdl", $wsdl);
5855
file_put_contents(__DIR__."/bug62900.xsd", $xsd);
5956

60-
$proc = proc_open([PHP_BINARY, ...$args, __DIR__.'/bug62900_run'], [1 => ["pipe", "w"], 2 => ["pipe", "w"]], $pipes);
57+
$proc = proc_open($cmd, [1 => ["pipe", "w"], 2 => ["pipe", "w"]], $pipes);
6158
echo stream_get_contents($pipes[1]);
6259
fclose($pipes[1]);
6360
proc_close($proc);

0 commit comments

Comments
 (0)