summaryrefslogtreecommitdiff
path: root/php/test
diff options
context:
space:
mode:
authorBenoit Foucher <benoit@zeroc.com>2013-06-04 11:35:29 +0200
committerBenoit Foucher <benoit@zeroc.com>2013-06-04 11:35:29 +0200
commitee339084ea7dc4fa602b8a4a36697f662b86bcf4 (patch)
tree1aad8c98334c7fb94442aba5d27cfeb2bba8cdd0 /php/test
parentAdded __hash proxy method to get around deprecation messages when using ice_g... (diff)
downloadice-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.php15
-rw-r--r--php/test/Ice/optional/Test.ice10
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
{