From 4091487adfbfd07750524fd7910d7178af21f816 Mon Sep 17 00:00:00 2001 From: valmat Date: Fri, 28 Mar 2014 21:58:30 +0600 Subject: add test: 018-calling-php-functions --- .../phpt/variables/018-calling-php-functions.phpt | 32 ++++++++++++++++++++++ 1 file changed, 32 insertions(+) create mode 100644 tests/php/phpt/variables/018-calling-php-functions.phpt (limited to 'tests/php/phpt/variables/018-calling-php-functions.phpt') 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-- + +--FILEEOF-- +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 -- cgit v1.2.3