diff options
| -rwxr-xr-x | tests/classes/interfaces_003.phpt | 33 |
1 files changed, 33 insertions, 0 deletions
diff --git a/tests/classes/interfaces_003.phpt b/tests/classes/interfaces_003.phpt new file mode 100755 index 0000000000..46ae8290ae --- /dev/null +++ b/tests/classes/interfaces_003.phpt @@ -0,0 +1,33 @@ +--TEST-- +ZE2 interface and __construct +--FILE-- +<?php + +class MyObject {} + +interface MyInterface +{ + public function __construct(Object $o); +} + +class MyTestClass implements MyInterface +{ + public function __construct(Object $o) + { + } +} + +$obj = new MyTestClass; + +class MyTestFail +{ + public function __construct() + { + } +} + +?> +===DONE=== +--EXPECTF-- + +Fatal error: Argument 1 passed to MyTestClass::__construct() must be an object of class Object, called in %sinterfaces_003.php on line %d |
