summaryrefslogtreecommitdiff
path: root/tests
diff options
context:
space:
mode:
authorEmiel Bruijntjes <emiel.bruijntjes@copernica.com>2013-09-25 09:41:17 -0700
committerEmiel Bruijntjes <emiel.bruijntjes@copernica.com>2013-09-25 09:41:17 -0700
commit753402a84b40ff4dc9697dea1d2d4aa037ea7624 (patch)
tree9ff5e95a534265d01ae732a1e39dd3aaf3127803 /tests
parent49ac629257835426c311fb7b92b23a9138a9d77b (diff)
Constructor gets almost called when object is constructed
Diffstat (limited to 'tests')
-rw-r--r--tests/simple/simple.cpp25
-rw-r--r--tests/simple/simple.php8
2 files changed, 33 insertions, 0 deletions
diff --git a/tests/simple/simple.cpp b/tests/simple/simple.cpp
index f2a5207..39e615a 100644
--- a/tests/simple/simple.cpp
+++ b/tests/simple/simple.cpp
@@ -45,7 +45,32 @@ static Php::Value my_plus(Php::Environment &env, Php::Parameters &params)
*/
class MyCustomClass : public Php::Base
{
+private:
+ int _x;
+
public:
+ MyCustomClass()
+ {
+ }
+
+ virtual void __construct()
+ {
+
+ }
+
+ virtual void __destruct()
+ {
+
+
+ }
+
+ void myMethod(Php::Parameters &params)
+ {
+
+
+ }
+
+
};
// symbols are exported according to the "C" language
diff --git a/tests/simple/simple.php b/tests/simple/simple.php
index af9a2a2..10cb603 100644
--- a/tests/simple/simple.php
+++ b/tests/simple/simple.php
@@ -31,3 +31,11 @@ echo("g1: $g1\n");
echo("g2: $g2\n");
echo("g3: $g3\n");
+
+if (class_exists("my_class")) echo("Warempel, de class bestaat\n");
+
+$x = new my_class();
+
+$x->my_method();
+
+