xref: /PHP-7.2/ext/soap/tests/schema/schema079.phpt (revision 73605400)
1--TEST--
2SOAP XML Schema 79: Element form qualified/unqualified (elementFormDefault="unqualified")
3--SKIPIF--
4<?php require_once('skipif.inc'); ?>
5--FILE--
6<?php
7include "test_schema.inc";
8$schema = <<<EOF
9	<complexType name="testType">
10		<sequence>
11			<element name="int1" type="int"/>
12			<element name="int2" type="int" form="qualified"/>
13			<element name="int3" type="int" form="unqualified"/>
14		</sequence>
15	</complexType>
16EOF;
17
18test_schema($schema,'type="tns:testType"',(object)array("int1"=>1.1,"int2"=>2.2,"int3"=>3.3), "rpc", "literal", 'elementFormDefault="unqualified"');
19echo "ok";
20?>
21--EXPECTF--
22<?xml version="1.0" encoding="UTF-8"?>
23<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>
24object(stdClass)#%d (3) {
25  ["int1"]=>
26  int(1)
27  ["int2"]=>
28  int(2)
29  ["int3"]=>
30  int(3)
31}
32ok
33