]> granicus.if.org Git - php/commitdiff
- Add new test
authorMarcus Boerger <helly@php.net>
Thu, 6 Oct 2005 18:32:28 +0000 (18:32 +0000)
committerMarcus Boerger <helly@php.net>
Thu, 6 Oct 2005 18:32:28 +0000 (18:32 +0000)
tests/classes/interfaces_003.phpt [new file with mode: 0755]

diff --git a/tests/classes/interfaces_003.phpt b/tests/classes/interfaces_003.phpt
new file mode 100755 (executable)
index 0000000..fa2cb73
--- /dev/null
@@ -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--
+
+Catchable fatal error: Argument 1 passed to MyTestClass::__construct() must be an object of class Object, called in %sinterfaces_003.php on line %d