Annotation of embedaddon/php/Zend/tests/traits/error_012.phpt, revision 1.1
1.1 ! misho 1: --TEST--
! 2: Trying to access a protected trait method
! 3: --FILE--
! 4: <?php
! 5:
! 6: trait foo {
! 7: public function test() { return 3; }
! 8: }
! 9:
! 10: class bar {
! 11: use foo { test as protected; }
! 12: }
! 13:
! 14: $x = new bar;
! 15: var_dump($x->test());
! 16:
! 17: ?>
! 18: --EXPECTF--
! 19: Fatal error: Call to protected method bar::test() from context '' in %s on line %d
FreeBSD-CVSweb <freebsd-cvsweb@FreeBSD.org>