mirror of
https://github.com/php/php-src.git
synced 2025-08-16 05:58:45 +02:00
enforce the test ini usage for the child process
This commit is contained in:
parent
46d708a1b6
commit
10a2ceef3b
1 changed files with 7 additions and 3 deletions
|
@ -48,9 +48,13 @@ class ServerClientTestCase
|
|||
|
||||
private function spawnWorkerProcess($code)
|
||||
{
|
||||
$cmd = sprintf('%s "%s" %s', PHP_BINARY, __FILE__, WORKER_ARGV_VALUE);
|
||||
|
||||
$this->workerHandle = proc_open($cmd, [['pipe', 'r'], ['pipe', 'w'], STDERR], $pipes);
|
||||
if (defined("PHP_WINDOWS_VERSION_MAJOR")) {
|
||||
$ini = php_ini_loaded_file();
|
||||
$cmd = sprintf('%s %s "%s" %s', PHP_BINARY, $ini ? "-n -c $ini" : "", __FILE__, WORKER_ARGV_VALUE);
|
||||
} else {
|
||||
$cmd = sprintf('%s "%s" %s', PHP_BINARY, __FILE__, WORKER_ARGV_VALUE);
|
||||
}
|
||||
$this->workerHandle = proc_open($cmd, [['pipe', 'r'], ['pipe', 'w'], STDERR], $pipes);
|
||||
$this->workerStdIn = $pipes[0];
|
||||
$this->workerStdOut = $pipes[1];
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue