bug31422.phpt 1.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142
  1. --TEST--
  2. Bug #31422 (No Error-Logging on SoapServer-Side)
  3. --EXTENSIONS--
  4. soap
  5. --INI--
  6. log_errors=1
  7. error_log=
  8. --FILE--
  9. <?php
  10. function Add($x,$y) {
  11. fopen();
  12. user_error("Hello", E_USER_ERROR);
  13. return $x+$y;
  14. }
  15. $server = new SoapServer(null,array('uri'=>"http://testuri.org"));
  16. $server->addfunction("Add");
  17. $HTTP_RAW_POST_DATA = <<<EOF
  18. <?xml version="1.0" encoding="ISO-8859-1"?>
  19. <SOAP-ENV:Envelope
  20. SOAP-ENV:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"
  21. xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/"
  22. xmlns:xsd="http://www.w3.org/2001/XMLSchema"
  23. xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
  24. xmlns:si="http://soapinterop.org/xsd">
  25. <SOAP-ENV:Body>
  26. <ns1:Add xmlns:ns1="http://testuri.org">
  27. <x xsi:type="xsd:int">22</x>
  28. <y xsi:type="xsd:int">33</y>
  29. </ns1:Add>
  30. </SOAP-ENV:Body>
  31. </SOAP-ENV:Envelope>
  32. EOF;
  33. $server->handle($HTTP_RAW_POST_DATA);
  34. echo "ok\n";
  35. ?>
  36. --EXPECT--
  37. <?xml version="1.0" encoding="UTF-8"?>
  38. <SOAP-ENV:Envelope xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/"><SOAP-ENV:Body><SOAP-ENV:Fault><faultcode>SOAP-ENV:Server</faultcode><faultstring>fopen() expects at least 2 arguments, 0 given</faultstring></SOAP-ENV:Fault></SOAP-ENV:Body></SOAP-ENV:Envelope>
  39. ok