@@ -20,7 +20,12 @@ function start_server(string $code, ?string $entry_point) {
2020 * When an <import> switches to a different server, check the headers that the
2121 * second server recieves
2222 */
23- function check_headers_for_import (string $ logs_path , $ context , bool $ verbose_failure = true ) {
23+ function check_headers_for_import (
24+ string $ logs_path ,
25+ $ context ,
26+ array $ options = [],
27+ bool $ verbose_failure = true ,
28+ ) {
2429 $ code = file_get_contents (__DIR__ . "/soap-respond-with-headers.inc " );
2530 $ code = substr ($ code , strpos ($ code , "<?php " ) + strlen ("<?php " ));
2631 $ code = str_replace ('"{LOG_FILE}" ' , var_export ($ logs_path , true ), $ code );
@@ -42,6 +47,7 @@ function check_headers_for_import(string $logs_path, $context, bool $verbose_fai
4247 $ client = new SoapClient ("http://localhost: $ wsdl_server_port " , [
4348 'soap_version ' => $ version ,
4449 'stream_context ' => $ context ,
50+ ...$ options ,
4551 ]);
4652 } catch (SoapFault $ e ) {
4753 if ($ verbose_failure ) {
@@ -61,7 +67,12 @@ function check_headers_for_import(string $logs_path, $context, bool $verbose_fai
6167 * When an <import> leads to a <schema> on a different server, check the
6268 * headers that the *third* server recieves
6369 */
64- function check_headers_for_schema (string $ logs_path , $ context , bool $ verbose_failure = true ) {
70+ function check_headers_for_schema (
71+ string $ logs_path ,
72+ $ context ,
73+ array $ options = [],
74+ bool $ verbose_failure = true
75+ ) {
6576 $ code = file_get_contents (__DIR__ . "/schema-respond-with-headers.inc " );
6677 $ code = substr ($ code , strpos ($ code , "<?php " ) + strlen ("<?php " ));
6778 $ code = str_replace ('"{LOG_FILE}" ' , var_export ($ logs_path , true ), $ code );
@@ -85,6 +96,7 @@ function check_headers_for_schema(string $logs_path, $context, bool $verbose_fai
8596 $ client = new SoapClient ("http://localhost: $ import_wsdl_server_port " , [
8697 'soap_version ' => $ version ,
8798 'stream_context ' => $ context ,
99+ ...$ options ,
88100 ]);
89101 } catch (SoapFault $ e ) {
90102 if ($ verbose_failure ) {
0 commit comments