1--TEST--
2ReflectionClass::hasMethod() - error cases
3--CREDITS--
4Robin Fernandes <robinf@php.net>
5Steve Seear <stevseea@php.net>
6--FILE--
7<?php
8class C {
9	function f() {}
10}
11
12$rc = new ReflectionClass("C");
13echo "Check invalid params:\n";
14var_dump($rc->hasMethod());
15var_dump($rc->hasMethod("f", "f"));
16var_dump($rc->hasMethod(null));
17var_dump($rc->hasMethod(1));
18var_dump($rc->hasMethod(1.5));
19var_dump($rc->hasMethod(true));
20var_dump($rc->hasMethod(array(1,2,3)));
21var_dump($rc->hasMethod(new C));
22?>
23--EXPECTF--
24Check invalid params:
25
26Warning: ReflectionClass::hasMethod() expects exactly 1 parameter, 0 given in %s on line 8
27NULL
28
29Warning: ReflectionClass::hasMethod() expects exactly 1 parameter, 2 given in %s on line 9
30NULL
31bool(false)
32bool(false)
33bool(false)
34bool(false)
35
36Warning: ReflectionClass::hasMethod() expects parameter 1 to be string, array given in %s on line 14
37NULL
38
39Warning: ReflectionClass::hasMethod() expects parameter 1 to be string, object given in %s on line 15
40NULL
41