~ubuntu-branches/ubuntu/saucy/php-soap/saucy

« back to all changes in this revision

Viewing changes to SOAP-0.13.0/tests/deserialize/struct_4.phpt

  • Committer: Package Import Robot
  • Author(s): Prach Pongpanich
  • Date: 2013-05-08 15:21:07 UTC
  • mfrom: (1.1.5)
  • Revision ID: package-import@ubuntu.com-20130508152107-x6a6delp9dy112zi
Tags: 0.13.0-1
* New upstream release
* Now using PKG-PHP-PEAR team as maintainer
* Add myself as uploader
* Add debian/gbp.conf file
* Add Vcs-* fields
* Switch to pkg-php-tools and rewrite debian/rules
* Drop debian/docs, upstream don't ship AUTHORS file
* Update copyright file to version 1.0 format
* Update description in debian/control
* Bump compat level to 9
* Bump Standards-Version 3.9.4

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
--TEST--
 
2
Deserialize custom struct
 
3
--FILE--
 
4
<?php
 
5
 
 
6
require_once dirname(__FILE__) . '/../test.utility.php';
 
7
require_once 'PEAR/Config.php';
 
8
$config = &PEAR_Config::singleton();
 
9
require_once dirname(dirname(dirname(__FILE__))) . '/example/example_server.php';
 
10
 
 
11
$msg = '<?xml version="1.0" encoding="UTF-8"?>
 
12
<SOAP-ENV:Envelope
 
13
 xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/"
 
14
 xmlns:xsd="http://www.w3.org/2001/XMLSchema"
 
15
 xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
 
16
 xmlns:SOAP-ENC="http://schemas.xmlsoap.org/soap/encoding/"
 
17
 xmlns:ns4="urn:SOAP_Example_Server"
 
18
 SOAP-ENV:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/">
 
19
<SOAP-ENV:Body>
 
20
<ns4:echoStruct>
 
21
<inputStruct>
 
22
<varString xsi:type="xsd:string">test string</varString>
 
23
<varInt xsi:type="xsd:int">123</varInt>
 
24
<varFloat xsi:type="xsd:float">123.123</varFloat></inputStruct></ns4:echoStruct>
 
25
</SOAP-ENV:Body>
 
26
</SOAP-ENV:Envelope>';
 
27
 
 
28
$val = parseMessage($msg);
 
29
var_dump($val);
 
30
 
 
31
?>
 
32
--EXPECTF--
 
33
object(stdClass)%s1) {
 
34
  ["inputStruct"]=>
 
35
 %sobject(stdClass)%s3) {
 
36
    ["varString"]=>
 
37
    string(11) "test string"
 
38
    ["varInt"]=>
 
39
    int(123)
 
40
    ["varFloat"]=>
 
41
    float(123.123)
 
42
  }
 
43
}