xref: /PHP-7.2/ext/soap/tests/bugs/bug34657.phpt (revision 17ccbeec)
1--TEST--
2Bug #34657 (If you get a communication problem when loading the WSDL, it fatal's)
3--SKIPIF--
4<?php
5require_once('skipif.inc');
6if (extension_loaded("openssl")) {
7	/*
8	 when openssl loaded, tcp stream is less verbose, so some error messages are missing
9	 so let's skip the test in this case
10	 */
11	die("skip OpenSSL extension required");
12}
13?>
14--FILE--
15<?php
16try {
17	$client = new SoapClient('http://i_dont_exist.com/some.wsdl');
18	echo "?\n";
19} catch (SoapFault $e) {
20	echo get_class($e)."\n";
21	echo $e->faultstring."\n";
22	echo "ok\n";
23} catch (Exception $e) {
24	echo get_class($e)."\n";
25}
26?>
27--EXPECTF--
28SoapFault
29SOAP-ERROR: Parsing WSDL: Couldn't load from 'http://i_dont_exist.com/some.wsdl'%A
30ok
31