summaryrefslogtreecommitdiff
path: root/Zend/tests/enum/__call.phpt
diff options
context:
space:
mode:
Diffstat (limited to 'Zend/tests/enum/__call.phpt')
-rw-r--r--Zend/tests/enum/__call.phpt29
1 files changed, 29 insertions, 0 deletions
diff --git a/Zend/tests/enum/__call.phpt b/Zend/tests/enum/__call.phpt
new file mode 100644
index 0000000000..b2be5eb040
--- /dev/null
+++ b/Zend/tests/enum/__call.phpt
@@ -0,0 +1,29 @@
+--TEST--
+Enum __call
+--FILE--
+<?php
+
+enum Foo {
+ case Bar;
+
+ public function __call(string $name, array $args)
+ {
+ return [$name, $args];
+ }
+}
+
+var_dump(Foo::Bar->baz('qux', 'quux'));
+
+?>
+--EXPECT--
+array(2) {
+ [0]=>
+ string(3) "baz"
+ [1]=>
+ array(2) {
+ [0]=>
+ string(3) "qux"
+ [1]=>
+ string(4) "quux"
+ }
+}