source: src/router/php7/ext/soap/tests/bugs/bug31422-win.phpt @ 30549

Last change on this file since 30549 was 30549, checked in by brainslayer, 9 months ago

php 7

File size: 1.4 KB
Line 
1--TEST--
2Bug #31422 (No Error-Logging on SoapServer-Side)
3--SKIPIF--
4<?php
5if (substr(PHP_OS, 0, 3) != 'WIN') {
6    die('skip not valid for non windows');
7}
8require_once('skipif.inc');
9?>
10--INI--
11log_errors=1
12--FILE--
13<?php
14function Add($x,$y) {
15        fopen();
16        user_error("Hello", E_USER_ERROR);
17  return $x+$y;
18}
19
20$server = new SoapServer(null,array('uri'=>"http://testuri.org"));
21$server->addfunction("Add");
22
23$HTTP_RAW_POST_DATA = <<<EOF
24<?xml version="1.0" encoding="ISO-8859-1"?>
25<SOAP-ENV:Envelope
26  SOAP-ENV:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"
27  xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/"
28  xmlns:xsd="http://www.w3.org/2001/XMLSchema"
29  xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
30  xmlns:si="http://soapinterop.org/xsd">
31  <SOAP-ENV:Body>
32    <ns1:Add xmlns:ns1="http://testuri.org">
33      <x xsi:type="xsd:int">22</x>
34      <y xsi:type="xsd:int">33</y>
35    </ns1:Add>
36  </SOAP-ENV:Body>
37</SOAP-ENV:Envelope>
38EOF;
39
40$server->handle($HTTP_RAW_POST_DATA);
41echo "ok\n";
42?>
43--EXPECTF--
44<?xml version="1.0" encoding="UTF-8"?>
45<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>
46PHP Warning:  fopen() expects at least 2 parameters, 0 given in %sbug31422-win.php on line %d
47PHP Fatal error:  Hello in %sbug31422-win.php on line %d
Note: See TracBrowser for help on using the repository browser.