summaryrefslogtreecommitdiff
path: root/tests
diff options
context:
space:
mode:
authorMarcus Boerger <helly@php.net>2005-10-06 18:34:16 +0000
committerMarcus Boerger <helly@php.net>2005-10-06 18:34:16 +0000
commit6eaf1671b5a9f22a4a7f90b00b46c09b6837ba6a (patch)
treeed2a67be805a5ba9e2194f76472160ef012f06f6 /tests
parentf42742f7966fd88984236e8fd81331ecf526368b (diff)
downloadphp-git-6eaf1671b5a9f22a4a7f90b00b46c09b6837ba6a.tar.gz
- Add new test
Diffstat (limited to 'tests')
-rwxr-xr-xtests/classes/interfaces_003.phpt33
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