1--TEST--
2ReflectionObject::isSubclassOf() - bad arguments
3--CREDITS--
4Robin Fernandes <robinf@php.net>
5Steve Seear <stevseea@php.net>
6--FILE--
7<?php
8class C {}
9$ro = new ReflectionObject(new C);
10
11echo "\n\nTest bad arguments:\n";
12try {
13	var_dump($ro->isSubclassOf());
14} catch (Exception $e) {
15	echo $e->getMessage() . "\n";
16}
17try {
18	var_dump($ro->isSubclassOf('C', 'C'));
19} catch (Exception $e) {
20	echo $e->getMessage() . "\n";
21}
22try {
23	var_dump($ro->isSubclassOf(null));
24} catch (Exception $e) {
25	echo $e->getMessage() . "\n";
26}
27try {
28	var_dump($ro->isSubclassOf('ThisClassDoesNotExist'));
29} catch (Exception $e) {
30	echo $e->getMessage() . "\n";
31}
32try {
33	var_dump($ro->isSubclassOf(2));
34} catch (Exception $e) {
35	echo $e->getMessage() . "\n";
36}
37?>
38--EXPECTF--
39Test bad arguments:
40
41Warning: ReflectionClass::isSubclassOf() expects exactly 1 parameter, 0 given in %s on line 7
42NULL
43
44Warning: ReflectionClass::isSubclassOf() expects exactly 1 parameter, 2 given in %s on line 12
45NULL
46Parameter one must either be a string or a ReflectionClass object
47Class ThisClassDoesNotExist does not exist
48Parameter one must either be a string or a ReflectionClass object