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