diff options
| author | Sebastian Bergmann <sebastian@php.net> | 2009-04-08 16:09:16 +0000 |
|---|---|---|
| committer | Sebastian Bergmann <sebastian@php.net> | 2009-04-08 16:09:16 +0000 |
| commit | 03b1d4f876daf5e6a36d7b167b980abda3c1d3e1 (patch) | |
| tree | 6173dd0a6a037431d332883465a35aa770d2c9dc /ext/reflection/tests/ReflectionObject_isInstantiable_basic.phpt | |
| parent | f8fc61244bf5ae72a248218f1d3190a418dc7d4f (diff) | |
| download | php-git-03b1d4f876daf5e6a36d7b167b980abda3c1d3e1.tar.gz | |
MFH: Rename reflection*.phpt to Reflection*.phpt for consistency.
Diffstat (limited to 'ext/reflection/tests/ReflectionObject_isInstantiable_basic.phpt')
| -rw-r--r-- | ext/reflection/tests/ReflectionObject_isInstantiable_basic.phpt | 36 |
1 files changed, 36 insertions, 0 deletions
diff --git a/ext/reflection/tests/ReflectionObject_isInstantiable_basic.phpt b/ext/reflection/tests/ReflectionObject_isInstantiable_basic.phpt new file mode 100644 index 0000000000..4b8a6ec221 --- /dev/null +++ b/ext/reflection/tests/ReflectionObject_isInstantiable_basic.phpt @@ -0,0 +1,36 @@ +--TEST-- +ReflectionObject::IsInstantiable() - basic function test +--FILE-- +<?php +class C { +} + +interface iface { + function f1(); +} + +class ifaceImpl implements iface { + function f1() {} +} + +abstract class abstractClass { + function f1() {} + abstract function f2(); +} + +class D extends abstractClass { + function f2() {} +} + +$classes = array("C", "ifaceImpl", "D"); + +foreach($classes as $class ) { + $ro = new ReflectionObject(new $class); + echo "Is $class instantiable? "; + var_dump($ro->IsInstantiable()); +} +?> +--EXPECTF-- +Is C instantiable? bool(true) +Is ifaceImpl instantiable? bool(true) +Is D instantiable? bool(true) |
