Annotation of embedaddon/php/ext/soap/tests/bugs/bug31422.phpt, revision 1.1.1.2

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
1.1.1.2 ! misho       7: error_log=
1.1       misho       8: --FILE--
                      9: <?php
                     10: function Add($x,$y) {
                     11:        fopen();
                     12:        user_error("Hello", E_USER_ERROR);
                     13:   return $x+$y;
                     14: }
                     15: 
                     16: $server = new SoapServer(null,array('uri'=>"http://testuri.org"));
                     17: $server->addfunction("Add");
                     18: 
                     19: $HTTP_RAW_POST_DATA = <<<EOF
                     20: <?xml version="1.0" encoding="ISO-8859-1"?>
                     21: <SOAP-ENV:Envelope
                     22:   SOAP-ENV:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"
                     23:   xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/"
                     24:   xmlns:xsd="http://www.w3.org/2001/XMLSchema"
                     25:   xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
                     26:   xmlns:si="http://soapinterop.org/xsd">
                     27:   <SOAP-ENV:Body>
                     28:     <ns1:Add xmlns:ns1="http://testuri.org">
                     29:       <x xsi:type="xsd:int">22</x>
                     30:       <y xsi:type="xsd:int">33</y>
                     31:     </ns1:Add>
                     32:   </SOAP-ENV:Body>
                     33: </SOAP-ENV:Envelope>
                     34: EOF;
                     35: 
                     36: $server->handle($HTTP_RAW_POST_DATA);
                     37: echo "ok\n";
                     38: ?>
                     39: --EXPECTF--
                     40: PHP Warning:  fopen() expects at least 2 parameters, 0 given in %sbug31422.php on line %d
                     41: PHP Fatal error:  Hello in %sbug31422.php on line %d
                     42: <?xml version="1.0" encoding="UTF-8"?>
                     43: <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>