summaryrefslogtreecommitdiff
path: root/ext/reflection/tests/ReflectionMethod_invokeArgs_error2.phpt
blob: 0d585d2a73bc7533b46fa1c5c4efc7b372fa7451 (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(90) "ReflectionMethod::invokeArgs() expects argument #2 ($args) to be of type array, bool given"