xref: /PHP-8.2/ext/soap/tests/schema/schema080.phpt (revision 7f2f0c00)
1--TEST--
2SOAP XML Schema 80: Element form qualified/unqualified (elementFormDefault - default)
3--EXTENSIONS--
4soap
5xml
6--FILE--
7<?php
8include "test_schema.inc";
9$schema = <<<EOF
10    <complexType name="testType">
11        <sequence>
12            <element name="int1" type="int"/>
13            <element name="int2" type="int" form="qualified"/>
14            <element name="int3" type="int" form="unqualified"/>
15        </sequence>
16    </complexType>
17EOF;
18
19test_schema($schema,'type="tns:testType"',(object)array("int1"=>1.1,"int2"=>2.2,"int3"=>3.3), "rpc", "literal");
20echo "ok";
21?>
22--EXPECTF--
23<?xml version="1.0" encoding="UTF-8"?>
24<SOAP-ENV:Envelope xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/" xmlns:ns1="http://test-uri/"><SOAP-ENV:Body><ns1:test><testParam><int1>1</int1><ns1:int2>2</ns1:int2><int3>3</int3></testParam></ns1:test></SOAP-ENV:Body></SOAP-ENV:Envelope>
25object(stdClass)#%d (3) {
26  ["int1"]=>
27  int(1)
28  ["int2"]=>
29  int(2)
30  ["int3"]=>
31  int(3)
32}
33ok
34