1--TEST--
2ReflectionMethod constructor errors
3--CREDITS--
4Robin Fernandes <robinf@php.net>
5Steve Seear <stevseea@php.net>
6--FILE--
7<?php
8
9class TestClass
10{
11    public function foo() {
12    }
13}
14
15
16try {
17	echo "Too few arguments:\n";
18	$methodInfo = new ReflectionMethod();
19} catch (Exception $e) {
20	print $e->__toString();
21}
22try {
23	echo "\nToo many arguments:\n";
24	$methodInfo = new ReflectionMethod("TestClass", "foo", true);
25} catch (Exception $e) {
26	print $e->__toString();
27}
28
29?>
30--EXPECTF--
31Too few arguments:
32
33Warning: ReflectionMethod::__construct() expects exactly 1 parameter, 0 given in %s on line 12
34
35Too many arguments:
36
37Warning: ReflectionMethod::__construct() expects exactly 1 parameter, 3 given in %s on line 18
38