summaryrefslogtreecommitdiff
path: root/ext/soap/tests/schema/schema017.phpt
diff options
context:
space:
mode:
authorDmitry Stogov <dmitry@php.net>2004-01-28 13:33:48 +0000
committerDmitry Stogov <dmitry@php.net>2004-01-28 13:33:48 +0000
commit84f259b448a1d50433b7aa5b74c88b138615b1a3 (patch)
treee2349e9baddc0cbd92bd09cc0ba4e6e643e93bce /ext/soap/tests/schema/schema017.phpt
parent43f0131ea14e092d2f63a0b9069e4acc4fe88de9 (diff)
downloadphp-git-84f259b448a1d50433b7aa5b74c88b138615b1a3.tar.gz
Test suite for XML Schema and SOAP encoding/decoding
Diffstat (limited to 'ext/soap/tests/schema/schema017.phpt')
-rw-r--r--ext/soap/tests/schema/schema017.phpt27
1 files changed, 27 insertions, 0 deletions
diff --git a/ext/soap/tests/schema/schema017.phpt b/ext/soap/tests/schema/schema017.phpt
new file mode 100644
index 0000000000..8b20483783
--- /dev/null
+++ b/ext/soap/tests/schema/schema017.phpt
@@ -0,0 +1,27 @@
+--TEST--
+SOAP XML Schema 17: union with list
+--SKIPIF--
+<?php require_once('skipif.inc'); ?>
+--FILE--
+<?php
+include "test_schema.inc";
+$schema = <<<EOF
+ <simpleType name="testType">
+ <union>
+ <simpleType>
+ <restriction base="float"/>
+ </simpleType>
+ <simpleType>
+ <list itemType="int"/>
+ </simpleType>
+ </union>
+ </simpleType>
+EOF;
+test_schema($schema,'type="tns:testType"',123.5);
+echo "ok";
+?>
+--EXPECT--
+<?xml version="1.0" encoding="UTF-8"?>
+<SOAP-ENV:Envelope xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/" xmlns:ns1="http://test-uri/" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:SOAP-ENC="http://schemas.xmlsoap.org/soap/encoding/" SOAP-ENV:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"><SOAP-ENV:Body><ns1:test><testParam xsi:type="ns1:testType">123.5</testParam></ns1:test></SOAP-ENV:Body></SOAP-ENV:Envelope>
+string(5) "123.5"
+ok