summaryrefslogtreecommitdiff
path: root/tests
diff options
context:
space:
mode:
authorEmiel Bruijntjes <emiel.bruijntjes@copernica.com>2013-08-28 23:11:57 +0200
committerEmiel Bruijntjes <emiel.bruijntjes@copernica.com>2013-08-28 23:11:57 +0200
commit5ab6927a5fa17e73161d7126ca506e5e51ba0e55 (patch)
tree321186e3f01c09c5f739725da5a06abc31104b67 /tests
parentd69d5ca8f8f6a8c75099052f8541d7144385572c (diff)
added parameter handling, and return value handling
Diffstat (limited to 'tests')
-rw-r--r--tests/simple/simple.cpp4
-rw-r--r--tests/simple/simple.php18
2 files changed, 20 insertions, 2 deletions
diff --git a/tests/simple/simple.cpp b/tests/simple/simple.cpp
index 06d4431..db314ca 100644
--- a/tests/simple/simple.cpp
+++ b/tests/simple/simple.cpp
@@ -48,7 +48,9 @@ public:
* Constructor
*/
SimpleExtension() : Extension("simple", "1.0", {
- PhpCpp::Function("hallo")
+ PhpCpp::Function("hallo", {
+ PhpCpp::Argument("arg1", true)
+ })
})
{
}
diff --git a/tests/simple/simple.php b/tests/simple/simple.php
index 0fb3e32..c8614da 100644
--- a/tests/simple/simple.php
+++ b/tests/simple/simple.php
@@ -1,3 +1,19 @@
<?php
-hallo();
+
+class XXX
+{
+ public function __toString()
+ {
+ return "MyClass";
+ }
+}
+
+$myvar = "hoi";
+
+$result = hallo($myvar, 1, 2, 3, "blabla", new XXX());
+
+echo("myvar = $myvar\n");
+
+echo("resultaat: $result\n");
+
?> \ No newline at end of file