xref: /php-src/ext/soap/tests/bugs/bug69668.phpt (revision e1b59e9e)
1--TEST--
2Bug #69668 (SOAP: special XML characters in namespace URIs not encoded)
3--EXTENSIONS--
4soap
5--FILE--
6<?php
7class MySoapClient extends SoapClient {
8    public function __doRequest($request, $location, $action, $version, $one_way = 0): string {
9        echo $request, PHP_EOL;
10        return '';
11    }
12}
13
14$client = new MySoapClient(__DIR__ . '/bug69668.wsdl', [
15    'trace'      => true,
16    'exceptions' => true,
17    'cache_wsdl' => WSDL_CACHE_NONE,
18]);
19
20$client->test();
21?>
22--EXPECT--
23<?xml version="1.0" encoding="UTF-8"?>
24<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>
25