blob: c564d6c16b36710b8130239afb69509274ccae95 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
|
--TEST--
ReflectionMethod::invoke() on an abstract method should fail even after calling setAccessible(true)
--FILE--
<?php
abstract class Test {
abstract static function foo();
}
$rm = new ReflectionMethod('Test', 'foo');
$rm->setAccessible(true);
try {
var_dump($rm->invoke(null));
} catch (ReflectionException $e) {
echo $e->getMessage(), "\n";
}
?>
--EXPECT--
Trying to invoke abstract method Test::foo()
|