diff options
Diffstat (limited to 'ext/reflection/tests/ReflectionMethod_basic1.phpt')
-rw-r--r-- | ext/reflection/tests/ReflectionMethod_basic1.phpt | 128 |
1 files changed, 128 insertions, 0 deletions
diff --git a/ext/reflection/tests/ReflectionMethod_basic1.phpt b/ext/reflection/tests/ReflectionMethod_basic1.phpt index 8eb970babb..e065d28ec6 100644 --- a/ext/reflection/tests/ReflectionMethod_basic1.phpt +++ b/ext/reflection/tests/ReflectionMethod_basic1.phpt @@ -49,6 +49,14 @@ class DerivedClass extends TestClass {} interface TestInterface { public function int(); + public function __construct($arg); + public function __destruct(); +} + +trait TestTrait { + public abstract function __construct(); + public function __destruct() { + } } reflectMethod("DerivedClass", "foo"); @@ -59,6 +67,10 @@ reflectMethod("DerivedClass", "prot"); reflectMethod("TestInterface", "int"); reflectMethod("ReflectionProperty", "__construct"); reflectMethod("TestClass", "__destruct"); +reflectMethod("TestInterface", "__construct"); +reflectMethod("TestInterface", "__destruct"); +reflectMethod("TestTrait", "__construct"); +reflectMethod("TestTrait", "__destruct"); ?> --EXPECT-- @@ -294,3 +306,119 @@ isDestructor(): bool(true) ********************************** +********************************** +Reflecting on method TestInterface::__construct() + + +isFinal(): +bool(false) + +isAbstract(): +bool(true) + +isPublic(): +bool(true) + +isPrivate(): +bool(false) + +isProtected(): +bool(false) + +isStatic(): +bool(false) + +isConstructor(): +bool(true) + +isDestructor(): +bool(false) + +********************************** +********************************** +Reflecting on method TestInterface::__destruct() + + +isFinal(): +bool(false) + +isAbstract(): +bool(true) + +isPublic(): +bool(true) + +isPrivate(): +bool(false) + +isProtected(): +bool(false) + +isStatic(): +bool(false) + +isConstructor(): +bool(false) + +isDestructor(): +bool(true) + +********************************** +********************************** +Reflecting on method TestTrait::__construct() + + +isFinal(): +bool(false) + +isAbstract(): +bool(true) + +isPublic(): +bool(true) + +isPrivate(): +bool(false) + +isProtected(): +bool(false) + +isStatic(): +bool(false) + +isConstructor(): +bool(true) + +isDestructor(): +bool(false) + +********************************** +********************************** +Reflecting on method TestTrait::__destruct() + + +isFinal(): +bool(false) + +isAbstract(): +bool(false) + +isPublic(): +bool(true) + +isPrivate(): +bool(false) + +isProtected(): +bool(false) + +isStatic(): +bool(false) + +isConstructor(): +bool(false) + +isDestructor(): +bool(true) + +********************************** |