Annotation of embedaddon/php/ext/reflection/tests/bug64239.phpt, revision 1.1
1.1 ! misho 1: --TEST--
! 2: Bug #64239 (ReflectionClass::getMethods() changed behavior)
! 3: --FILE--
! 4: <?php
! 5: class A {
! 6: use T2 { t2method as Bmethod; }
! 7: }
! 8: trait T2 {
! 9: public function t2method() {
! 10: }
! 11: }
! 12:
! 13: class B extends A{
! 14: }
! 15:
! 16: $obj = new ReflectionClass("B");
! 17: print_r($obj->getMethods());
! 18: print_r(($method = $obj->getMethod("Bmethod")));
! 19: var_dump($method->getName());
! 20: var_dump($method->getShortName());
! 21: ?>
! 22: --EXPECT--
! 23: Array
! 24: (
! 25: [0] => ReflectionMethod Object
! 26: (
! 27: [name] => Bmethod
! 28: [class] => A
! 29: )
! 30:
! 31: [1] => ReflectionMethod Object
! 32: (
! 33: [name] => t2method
! 34: [class] => A
! 35: )
! 36:
! 37: )
! 38: ReflectionMethod Object
! 39: (
! 40: [name] => Bmethod
! 41: [class] => A
! 42: )
! 43: string(7) "Bmethod"
! 44: string(7) "Bmethod"
FreeBSD-CVSweb <freebsd-cvsweb@FreeBSD.org>