summaryrefslogtreecommitdiff
path: root/ext/reflection/tests/ReflectionMethod_invokeArgs_error2.phpt
blob: 869682ccdd4516f884fbacc8eefa171b84ab82af (plain)
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
--TEST--
ReflectionMethod::invokeArgs() further errors
--FILE--
<?php

class TestClass {

    public function foo() {
        echo "Called foo()\n";
        var_dump($this);
        return "Return Val";
    }
}

$foo = new ReflectionMethod('TestClass', 'foo');

$testClassInstance = new TestClass();

try {
    var_dump($foo->invokeArgs($testClassInstance, true));
} catch (Error $e) {
    var_dump($e->getMessage());
}

?>
--EXPECT--
string(85) "ReflectionMethod::invokeArgs(): Argument #2 ($args) must be of type array, bool given"