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

1.1       misho       1: --TEST--
                      2: ReflectionMethod::getDeclaringClass()
                      3: --FILE--
                      4: <?php
                      5: 
                      6: class A {
                      7:     function foo() {}
                      8: }
                      9: 
                     10: class B extends A {
                     11:     function bar() {}
                     12: }
                     13: 
                     14: $methodInfo = new ReflectionMethod('B', 'foo');
                     15: var_dump($methodInfo->getDeclaringClass());
                     16: 
                     17: $methodInfo = new ReflectionMethod('B', 'bar');
                     18: var_dump($methodInfo->getDeclaringClass());
                     19: 
                     20: ?> 
                     21: --EXPECTF--
                     22: object(ReflectionClass)#%d (1) {
                     23:   ["name"]=>
                     24:   string(1) "A"
                     25: }
                     26: object(ReflectionClass)#%d (1) {
                     27:   ["name"]=>
                     28:   string(1) "B"
                     29: }
                     30: 

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