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    $rc->isSubclassOf();
14} catch (ArgumentCountError $e) {
15    echo $e->getMessage() . "\n";
16}
17try {
18    $rc->isSubclassOf('C', 'C');
19} catch (ArgumentCountError $e) {
20    echo $e->getMessage() . "\n";
21}
22try {
23    $rc->isSubclassOf(null);
24} catch (ReflectionException $e) {
25    echo $e->getMessage() . "\n";
26}
27try {
28    $rc->isSubclassOf('ThisClassDoesNotExist');
29} catch (ReflectionException $e) {
30    echo $e->getMessage() . "\n";
31}
32try {
33    $rc->isSubclassOf(2);
34} catch (ReflectionException $e) {
35    echo $e->getMessage() . "\n";
36}
37?>
38--EXPECTF--
39Test bad arguments:
40ReflectionClass::isSubclassOf() expects exactly 1 argument, 0 given
41ReflectionClass::isSubclassOf() expects exactly 1 argument, 2 given
42
43Deprecated: ReflectionClass::isSubclassOf(): Passing null to parameter #1 ($class) of type ReflectionClass|string is deprecated in %s on line %d
44Class "" does not exist
45Class "ThisClassDoesNotExist" does not exist
46Class "2" does not exist
47