Annotation of embedaddon/php/Zend/tests/traits/error_010.phpt, revision 1.1.1.2

1.1       misho       1: --TEST--
                      2: Trying to exclude trait method multiple times
                      3: --FILE--
                      4: <?php
                      5: 
                      6: trait foo {
                      7:        public function test() { return 3; }
                      8: }
                      9: trait c {
                     10:        public function test() { return 2; }
                     11: }
                     12: 
                     13: class bar {
1.1.1.2 ! misho      14:        use foo, c { c::test insteadof foo; }
        !            15:        use foo, c { c::test insteadof foo; }
1.1       misho      16: }
                     17: 
                     18: $x = new bar;
                     19: var_dump($x->test());
                     20: 
                     21: ?>
                     22: --EXPECTF--
                     23: Fatal error: Failed to evaluate a trait precedence (test). Method of trait foo was defined to be excluded multiple times in %s on line %d

FreeBSD-CVSweb <freebsd-cvsweb@FreeBSD.org>