1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31
|
--TEST--
ReflectionParameter::__construct(): Invalid method as constructor
--FILE--
<?php
// Invalid class name
try {
new ReflectionParameter (array ('A', 'b'), 0);
} catch (ReflectionException $e) { echo $e->getMessage ()."\n"; }
// Invalid class method
try {
new ReflectionParameter (array ('C', 'b'), 0);
} catch (ReflectionException $e) { echo $e->getMessage ()."\n"; }
// Invalid object method
try {
new ReflectionParameter (array (new C, 'b'), 0);
} catch (ReflectionException $e) { echo $e->getMessage ()."\n"; }
echo "Done.\n";
class C {
}
?>
--EXPECTF--
Class A does not exist
Method C::b() does not exist
Method C::b() does not exist
Done.
|