diff options
author | Benoit Foucher <benoit@zeroc.com> | 2013-06-04 11:35:29 +0200 |
---|---|---|
committer | Benoit Foucher <benoit@zeroc.com> | 2013-06-04 11:35:29 +0200 |
commit | ee339084ea7dc4fa602b8a4a36697f662b86bcf4 (patch) | |
tree | 1aad8c98334c7fb94442aba5d27cfeb2bba8cdd0 /php/test | |
parent | Added __hash proxy method to get around deprecation messages when using ice_g... (diff) | |
download | ice-ee339084ea7dc4fa602b8a4a36697f662b86bcf4.tar.bz2 ice-ee339084ea7dc4fa602b8a4a36697f662b86bcf4.tar.xz ice-ee339084ea7dc4fa602b8a4a36697f662b86bcf4.zip |
Added missing tests for optionals
Diffstat (limited to 'php/test')
-rw-r--r-- | php/test/Ice/optional/Client.php | 15 | ||||
-rw-r--r-- | php/test/Ice/optional/Test.ice | 10 |
2 files changed, 25 insertions, 0 deletions
diff --git a/php/test/Ice/optional/Client.php b/php/test/Ice/optional/Client.php index b7869aeb6a8..96e1f953f4c 100644 --- a/php/test/Ice/optional/Client.php +++ b/php/test/Ice/optional/Client.php @@ -396,6 +396,21 @@ function allTests($communicator) echo "ok\n"; + echo "testing marshalling of objects with optional objects..."; + flush(); + + $fcls = $NS ? "Test\\F" : "Test_F"; + $f = new $fcls; + + $acls = $NS ? "Test\\A" : "Test_A"; + $f->af = new $acls; + $f->ae = $f->af; + + $rf = $initial->pingPong($f); + test($rf->ae == $rf->af); + + echo "ok\n"; + echo "testing optional with default values... "; flush(); diff --git a/php/test/Ice/optional/Test.ice b/php/test/Ice/optional/Test.ice index 52bef17075d..69aa5c2a14e 100644 --- a/php/test/Ice/optional/Test.ice +++ b/php/test/Ice/optional/Test.ice @@ -161,6 +161,16 @@ class OptionalWithCustom optional(3) ClassVarStruct s; }; +class E +{ + A ae; +}; + +class F extends E +{ + optional(1) A af; +}; + ["ami"] class Initial { |