php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login

Patch test_php_extra_args for Testing related Bug #78345

Patch version 2019-07-29 10:42 UTC

Return to Bug #78345 | Download this patch
Patch Revisions:

Developer: cmb@php.net

 ext/openssl/tests/ServerClientTestCase.inc | 24 +++++++-----------------
 1 file changed, 7 insertions(+), 17 deletions(-)

diff --git a/ext/openssl/tests/ServerClientTestCase.inc b/ext/openssl/tests/ServerClientTestCase.inc
index 753366df6f..5f604e5fcc 100644
--- a/ext/openssl/tests/ServerClientTestCase.inc
+++ b/ext/openssl/tests/ServerClientTestCase.inc
@@ -62,23 +62,13 @@ class ServerClientTestCase
 
     private function spawnWorkerProcess($worker, $code)
     {
-        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 %s',
-                PHP_BINARY,
-                __FILE__,
-                WORKER_ARGV_VALUE,
-                $worker
-            );
-        }
+        $extra_args = getenv('TEST_PHP_EXTRA_ARGS');
+        $cmd = sprintf(
+            '%s %s "%s" %s',
+            PHP_BINARY, $extra_args ? $extra_args : "",
+            __FILE__,
+            WORKER_ARGV_VALUE
+        );
         $this->workerHandle[$worker] = proc_open(
             $cmd,
             [['pipe', 'r'], ['pipe', 'w'], STDERR],
 
PHP Copyright © 2001-2022 The PHP Group
All rights reserved.
Last updated: Sun Dec 04 04:05:54 2022 UTC