File:
[ELWIX - Embedded LightWeight unIX -] /
embedaddon /
php /
ext /
reflection /
tests /
ReflectionObject_isSubclassOf_error.phpt
Revision
1.1.1.1 (vendor branch):
download - view:
text,
annotated -
select for diffs -
revision graph
Tue Feb 21 23:48:00 2012 UTC (13 years, 1 month ago) by
misho
Branches:
php,
MAIN
CVS tags:
v5_4_3elwix,
v5_4_29p0,
v5_4_29,
v5_4_20p0,
v5_4_20,
v5_4_17p0,
v5_4_17,
v5_3_10,
HEAD
php
--TEST--
ReflectionObject::isSubclassOf() - invalid params
--FILE--
<?php
class A {}
$ro = new ReflectionObject(new A);
var_dump($ro->isSubclassOf());
var_dump($ro->isSubclassOf('A',5));
var_dump($ro->isSubclassOf('X'));
?>
--EXPECTF--
Warning: ReflectionClass::isSubclassOf() expects exactly 1 parameter, 0 given in %s on line 5
NULL
Warning: ReflectionClass::isSubclassOf() expects exactly 1 parameter, 2 given in %s on line 6
NULL
Fatal error: Uncaught exception 'ReflectionException' with message 'Class X does not exist' in %s:7
Stack trace:
#0 %s(7): ReflectionClass->isSubclassOf('X')
#1 {main}
thrown in %s on line 7
FreeBSD-CVSweb <freebsd-cvsweb@FreeBSD.org>