Annotation of embedaddon/php/ext/reflection/tests/ReflectionMethod_invoke_error2.phpt, revision 1.1.1.1

1.1       misho       1: --TEST--
                      2: ReflectionMethod::invoke() further errors
                      3: --FILE--
                      4: <?php
                      5: 
                      6: class TestClass {
                      7: 
                      8:     public function methodWithArgs($a, $b) {
                      9:         echo "Called methodWithArgs($a, $b)\n";
                     10:     }
                     11: }
                     12: 
                     13: $methodWithArgs = new ReflectionMethod('TestClass', 'methodWithArgs');
                     14: 
                     15: $testClassInstance = new TestClass();
                     16: 
                     17: echo "\nMethod with args:\n";
                     18: var_dump($methodWithArgs->invoke($testClassInstance));
                     19: 
                     20: ?>
                     21: --EXPECTF--
                     22: Method with args:
                     23: 
                     24: Warning: Missing argument 1 for TestClass::methodWithArgs() in %s on line %d
                     25: 
                     26: Warning: Missing argument 2 for TestClass::methodWithArgs() in %s on line %d
                     27: 
                     28: Notice: Undefined variable: a in %s on line %d
                     29: 
                     30: Notice: Undefined variable: b in %s on line %d
                     31: Called methodWithArgs(, )
                     32: NULL

FreeBSD-CVSweb <freebsd-cvsweb@FreeBSD.org>