1--TEST-- 2SoapServer in non WSDL mode without required options 3--EXTENSIONS-- 4soap 5--FILE-- 6<?php 7 8class ExtendedSoapServer extends SoapServer {} 9 10echo "\$options not provided\n"; 11try { 12 $client = new SoapServer(null); 13} catch (Throwable $e) { 14 echo $e::class, ': ', $e->getMessage(), PHP_EOL; 15} 16try { 17 $client = new ExtendedSoapServer(null); 18} catch (Throwable $e) { 19 echo $e::class, ': ', $e->getMessage(), PHP_EOL; 20} 21 22echo "Empty \$options array\n"; 23$options = []; 24try { 25 $client = new SoapServer(null, $options); 26} catch (Throwable $e) { 27 echo $e::class, ': ', $e->getMessage(), PHP_EOL; 28} 29try { 30 $client = new ExtendedSoapServer(null, $options); 31} catch (Throwable $e) { 32 echo $e::class, ': ', $e->getMessage(), PHP_EOL; 33} 34 35echo "\$options array only sets \"uri\" option\n"; 36$options = ['uri' => 'https://example.com']; 37try { 38 $client = new SoapServer(null, $options); 39} catch (Throwable $e) { 40 echo $e::class, ': ', $e->getMessage(), PHP_EOL; 41} 42try { 43 $client = new ExtendedSoapServer(null, $options); 44} catch (Throwable $e) { 45 echo $e::class, ': ', $e->getMessage(), PHP_EOL; 46} 47 48?> 49--EXPECT-- 50$options not provided 51<?xml version="1.0" encoding="UTF-8"?> 52<SOAP-ENV:Envelope xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/"><SOAP-ENV:Body><SOAP-ENV:Fault><faultcode>SOAP-ENV:Server</faultcode><faultstring>SoapServer::__construct(): 'uri' option is required in nonWSDL mode</faultstring></SOAP-ENV:Fault></SOAP-ENV:Body></SOAP-ENV:Envelope> 53