Return to bug31422.phpt CVS log | Up to [ELWIX - Embedded LightWeight unIX -] / embedaddon / php / ext / soap / tests / bugs |
1.1 misho 1: --TEST-- 2: Bug #31422 (No Error-Logging on SoapServer-Side) 3: --SKIPIF-- 4: <?php require_once('skipif.inc'); ?> 5: --INI-- 6: log_errors=1 7: --FILE-- 8: <?php 9: function Add($x,$y) { 10: fopen(); 11: user_error("Hello", E_USER_ERROR); 12: return $x+$y; 13: } 14: 15: $server = new SoapServer(null,array('uri'=>"http://testuri.org")); 16: $server->addfunction("Add"); 17: 18: $HTTP_RAW_POST_DATA = <<<EOF 19: <?xml version="1.0" encoding="ISO-8859-1"?> 20: <SOAP-ENV:Envelope 21: SOAP-ENV:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/" 22: xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/" 23: xmlns:xsd="http://www.w3.org/2001/XMLSchema" 24: xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" 25: xmlns:si="http://soapinterop.org/xsd"> 26: <SOAP-ENV:Body> 27: <ns1:Add xmlns:ns1="http://testuri.org"> 28: <x xsi:type="xsd:int">22</x> 29: <y xsi:type="xsd:int">33</y> 30: </ns1:Add> 31: </SOAP-ENV:Body> 32: </SOAP-ENV:Envelope> 33: EOF; 34: 35: $server->handle($HTTP_RAW_POST_DATA); 36: echo "ok\n"; 37: ?> 38: --EXPECTF-- 39: PHP Warning: fopen() expects at least 2 parameters, 0 given in %sbug31422.php on line %d 40: PHP Fatal error: Hello in %sbug31422.php on line %d 41: <?xml version="1.0" encoding="UTF-8"?> 42: <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>