Annotation of embedaddon/php/Zend/tests/traits/bugs/abstract-methods04.phpt, revision 1.1
1.1 ! misho 1: --TEST--
! 2: Abstract Trait Methods should behave like common abstract methods and
! 3: implementstion may be provided by other traits. Sorting order shouldn't influence result.
! 4: --FILE--
! 5: <?php
! 6: error_reporting(E_ALL);
! 7:
! 8: trait THello {
! 9: public abstract function hello();
! 10: }
! 11:
! 12: trait THelloImpl {
! 13: public function hello() {
! 14: echo 'Hello';
! 15: }
! 16: }
! 17:
! 18: class TraitsTest1 {
! 19: use THello;
! 20: use THelloImpl;
! 21: }
! 22:
! 23: $test = new TraitsTest1();
! 24: $test->hello();
! 25:
! 26: class TraitsTest2 {
! 27: use THelloImpl;
! 28: use THello;
! 29: }
! 30:
! 31: $test = new TraitsTest2();
! 32: $test->hello();
! 33:
! 34: ?>
! 35: --EXPECTF--
! 36: HelloHello
FreeBSD-CVSweb <freebsd-cvsweb@FreeBSD.org>