summaryrefslogtreecommitdiff
path: root/tests/php/phpt/variables/018-calling-php-functions.phpt
diff options
context:
space:
mode:
authorEmiel Bruijntjes <emiel.bruijntjes@copernica.com>2014-03-29 13:10:46 +0100
committerEmiel Bruijntjes <emiel.bruijntjes@copernica.com>2014-03-29 13:10:46 +0100
commit7b7efa4f80dc5c9d26b59087270a8d89fedcc808 (patch)
tree1dfb0ce4a6662a5bcb6562b40ab91f813a959afc /tests/php/phpt/variables/018-calling-php-functions.phpt
parentc0e1f20eeab6445d6355ea11ef7d264cb37c52cf (diff)
parent8bd7f5162870e4b39c7629c1a67a3372402406c9 (diff)
Merge pull request #56 from valmat/tests
New tests
Diffstat (limited to 'tests/php/phpt/variables/018-calling-php-functions.phpt')
-rw-r--r--tests/php/phpt/variables/018-calling-php-functions.phpt32
1 files changed, 32 insertions, 0 deletions
diff --git a/tests/php/phpt/variables/018-calling-php-functions.phpt b/tests/php/phpt/variables/018-calling-php-functions.phpt
new file mode 100644
index 0000000..1b8bfeb
--- /dev/null
+++ b/tests/php/phpt/variables/018-calling-php-functions.phpt
@@ -0,0 +1,32 @@
+--TEST--
+calling-php-callable
+--DESCRIPTION--
+call callable object of class from user space
+call method of class from user space
+--SKIPIF--
+<?php if (!extension_loaded("extension_for_tests")) print "skip"; ?>
+--FILEEOF--
+<?php
+
+
+class CallableClass {
+ public function __construct($a){ $this->a = $a;}
+ public function __invoke($b){ echo "CallableClass({$this->a})::__invoke($b)";}
+ private $a = "";
+}
+
+class usrspClass {
+ function __construct($a){ $this->a = $a;}
+ function someMethod($b) {echo "usrspClass({$this->a})::someMethod($b)";}
+ private $a = "";
+}
+
+
+TestVariables\fnFromUserSpace2();
+
+
+--EXPECT--
+2014-03-28 21:22:15
+2014-03-28 21:22:15
+usrspClass(Mount Meru)::someMethod(is in the Arctics)
+CallableClass(Arctics around mount Meru)::__invoke(is the birthplace of the Hyperboreans) \ No newline at end of file