Annotation of embedaddon/php/ext/soap/tests/bugs/bug31422.phpt, revision 1.1.1.3
1.1 misho 1: --TEST--
2: Bug #31422 (No Error-Logging on SoapServer-Side)
3: --SKIPIF--
1.1.1.3 ! misho 4: <?php
! 5: if (substr(PHP_OS, 0, 3) == 'WIN') {
! 6: die('skip not valid for windows');
! 7: }
! 8: require_once('skipif.inc');
! 9: ?>
1.1 misho 10: --INI--
11: log_errors=1
1.1.1.2 misho 12: error_log=
1.1 misho 13: --FILE--
14: <?php
15: function Add($x,$y) {
16: fopen();
17: user_error("Hello", E_USER_ERROR);
18: return $x+$y;
19: }
20:
21: $server = new SoapServer(null,array('uri'=>"http://testuri.org"));
22: $server->addfunction("Add");
23:
24: $HTTP_RAW_POST_DATA = <<<EOF
25: <?xml version="1.0" encoding="ISO-8859-1"?>
26: <SOAP-ENV:Envelope
27: SOAP-ENV:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"
28: xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/"
29: xmlns:xsd="http://www.w3.org/2001/XMLSchema"
30: xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
31: xmlns:si="http://soapinterop.org/xsd">
32: <SOAP-ENV:Body>
33: <ns1:Add xmlns:ns1="http://testuri.org">
34: <x xsi:type="xsd:int">22</x>
35: <y xsi:type="xsd:int">33</y>
36: </ns1:Add>
37: </SOAP-ENV:Body>
38: </SOAP-ENV:Envelope>
39: EOF;
40:
41: $server->handle($HTTP_RAW_POST_DATA);
42: echo "ok\n";
43: ?>
44: --EXPECTF--
45: PHP Warning: fopen() expects at least 2 parameters, 0 given in %sbug31422.php on line %d
46: PHP Fatal error: Hello in %sbug31422.php on line %d
47: <?xml version="1.0" encoding="UTF-8"?>
48: <SOAP-ENV:Envelope xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/"><SOAP-ENV:Body><SOAP-ENV:Fault><faultcode>SOAP-ENV:Server</faultcode><faultstring>Hello</faultstring></SOAP-ENV:Fault></SOAP-ENV:Body></SOAP-ENV:Envelope>
FreeBSD-CVSweb <freebsd-cvsweb@FreeBSD.org>