mirror of
https://github.com/php/php-src.git
synced 2025-08-16 05:58:45 +02:00
- Add new test
This commit is contained in:
parent
f42742f796
commit
6eaf1671b5
1 changed files with 33 additions and 0 deletions
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--
|
||||
|
||||
Fatal error: Argument 1 passed to MyTestClass::__construct() must be an object of class Object, called in %sinterfaces_003.php on line %d
|
Loading…
Add table
Add a link
Reference in a new issue