From f1f6818c20143abcb0253906a15c16e9fec778bb Mon Sep 17 00:00:00 2001 From: Harald Radi Date: Mon, 10 Jun 2002 21:15:38 +0000 Subject: [PATCH] new testcases --- ext/rpc/tests/test1.php | 43 +++++++++-------------------------------- ext/rpc/tests/test2.php | 20 +++++++++++++++++++ ext/rpc/tests/test3.php | 19 ++++++++++++++++++ ext/rpc/tests/test4.php | 18 +++++++++++++++++ ext/rpc/tests/tests.php | 6 ++++++ 5 files changed, 72 insertions(+), 34 deletions(-) create mode 100644 ext/rpc/tests/test2.php create mode 100644 ext/rpc/tests/test3.php create mode 100644 ext/rpc/tests/test4.php create mode 100644 ext/rpc/tests/tests.php diff --git a/ext/rpc/tests/test1.php b/ext/rpc/tests/test1.php index aee876aedb3..b61a4aad5f9 100644 --- a/ext/rpc/tests/test1.php +++ b/ext/rpc/tests/test1.php @@ -1,39 +1,14 @@ call("blah"); -$rpc->call("heh"); -$rpc->call("blah"); -com_call($rpc, 1, "1"); -com_call($rpc, 1, "1"); -$rpc->call("blah"); -$rpc->call("blah"); -$rpc->call("blah"); -$rpc2->call("hehe"); -$rpc2->call("hehe"); -$rpc2->call("hehe"); -$rpc2->call("hehe"); -$rpc2->call("hehe"); -com_call($rpc, "call", 1); -com_call($rpc, 1, "1"); -com_call($rpc, "call", 1); -com_call($rpc2, "call", 1); -com_call($rpc2, "call", 1); -//$rpc->addref(); +$rpc = new com("class"); -//$clone = $rpc->__clone(); +/* class hirarchy test */ +echo "is class .. " . (get_class($rpc) == "class" ? "passed" : "faiure"); +echo "\n"; +echo "is com .. " . (is_subclass_of($rpc, "com") ? "passed" : "failure"); +echo "\n"; +echo "is rpc .. " . (is_subclass_of($rpc, "rpc") ? "passed" : "failure"); -//$rpc->prop = 1; -//$a = $rpc->prop; - -//$a = &$rpc->prop; - -//delete $rpc; -//delete $clone; - -$heh = com_load("heh", 1); -$heh->knorp(); -/*delete $heh;*/ +/* uncloneable */ +//$rpc->__clone(); // issues a fatal ?> \ No newline at end of file diff --git a/ext/rpc/tests/test2.php b/ext/rpc/tests/test2.php new file mode 100644 index 00000000000..666033da2ab --- /dev/null +++ b/ext/rpc/tests/test2.php @@ -0,0 +1,20 @@ +{3} = "hh"; +com_set($rpc2, "hehe", 3); + +$rpc1->call("blah"); +$rpc2->call("blah"); +$rpc3->call("blah"); +$rpc4->call("heh"); +$rpc5->call("blah"); +?> \ No newline at end of file diff --git a/ext/rpc/tests/test3.php b/ext/rpc/tests/test3.php new file mode 100644 index 00000000000..8fe522cb373 --- /dev/null +++ b/ext/rpc/tests/test3.php @@ -0,0 +1,19 @@ + diff --git a/ext/rpc/tests/test4.php b/ext/rpc/tests/test4.php new file mode 100644 index 00000000000..e6902736724 --- /dev/null +++ b/ext/rpc/tests/test4.php @@ -0,0 +1,18 @@ + diff --git a/ext/rpc/tests/tests.php b/ext/rpc/tests/tests.php new file mode 100644 index 00000000000..2ea6a7d0196 --- /dev/null +++ b/ext/rpc/tests/tests.php @@ -0,0 +1,6 @@ +