Annotation of embedaddon/php/ext/reflection/tests/bug39001.phpt, revision 1.1
1.1 ! misho 1: --TEST--
! 2: Bug #39001 (ReflectionProperty returns incorrect declaring class for protected properties)
! 3: --FILE--
! 4: <?php
! 5:
! 6: class Meta {
! 7: }
! 8:
! 9: class CParent extends Meta {
! 10: public $publicVar;
! 11: protected $protectedVar;
! 12: }
! 13:
! 14: class Child extends CParent {
! 15: }
! 16:
! 17: $r = new ReflectionClass('Child');
! 18:
! 19: var_dump($r->getProperty('publicVar')->getDeclaringClass()->getName());
! 20: var_dump($r->getProperty('protectedVar')->getDeclaringClass()->getName());
! 21:
! 22: echo "Done\n";
! 23: ?>
! 24: --EXPECTF--
! 25: string(7) "CParent"
! 26: string(7) "CParent"
! 27: Done
FreeBSD-CVSweb <freebsd-cvsweb@FreeBSD.org>