Annotation of embedaddon/php/Zend/tests/traits/bugs/abstract-methods02.phpt, revision 1.1
1.1 ! misho 1: --TEST--
! 2: Abstract Trait Methods should behave like common abstract methods.
! 3: --FILE--
! 4: <?php
! 5: error_reporting(E_ALL);
! 6:
! 7: trait THello {
! 8: public abstract function hello();
! 9: }
! 10:
! 11: trait THelloImpl {
! 12: public function hello() {
! 13: echo 'Hello';
! 14: }
! 15: }
! 16:
! 17: class TraitsTest {
! 18: use THello;
! 19: use THelloImpl;
! 20: }
! 21:
! 22: $test = new TraitsTest();
! 23: $test->hello();
! 24: ?>
! 25: --EXPECTF--
! 26: Hello
FreeBSD-CVSweb <freebsd-cvsweb@FreeBSD.org>