mirror of
https://github.com/php/php-src.git
synced 2024-09-23 02:47:26 +00:00
- Add new test
This commit is contained in:
parent
61eae75ec3
commit
f1d1c5e282
33
tests/classes/interfaces_003.phpt
Executable file
33
tests/classes/interfaces_003.phpt
Executable file
@ -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
|
Loading…
Reference in New Issue
Block a user