xref: /PHP-7.4/ext/soap/tests/bug69668.phpt (revision 75cb6782)
1--TEST--
2Bug #69668 (SOAP: special XML characters in namespace URIs not encoded)
3--SKIPIF--
4<?php
5require_once('skipif.inc');
6?>
7--FILE--
8<?php
9class MySoapClient extends SoapClient {
10    public function __doRequest($request, $location, $action, $version, $one_way = 0) {
11        echo $request, PHP_EOL;
12        return '';
13    }
14}
15
16$client = new MySoapClient(__DIR__ . '/bug69668.wsdl', [
17    'trace'      => true,
18    'exceptions' => true,
19    'cache_wsdl' => WSDL_CACHE_NONE,
20]);
21
22$client->test();
23?>
24--EXPECT--
25<?xml version="1.0" encoding="UTF-8"?>
26<SOAP-ENV:Envelope xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/" xmlns:ns1="http://localhost/69668.php?a=a&amp;b=b" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:SOAP-ENC="http://schemas.xmlsoap.org/soap/encoding/" SOAP-ENV:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"><SOAP-ENV:Body><ns1:test/></SOAP-ENV:Body></SOAP-ENV:Envelope>
27