Annotation of embedaddon/php/Zend/tests/traits/error_011.phpt, revision 1.1.1.1

1.1       misho       1: --TEST--
                      2: Testing trait collisions
                      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: trait b {
                     14:        public function test() { return 1; }
                     15: }
                     16: 
                     17: class bar {
                     18:        use foo, c, b;
                     19: }
                     20: 
                     21: $x = new bar;
                     22: var_dump($x->test());
                     23: 
                     24: ?>
                     25: --EXPECTF--
                     26: Fatal error: Trait method test has not been applied, because there are collisions with other trait methods on bar in %s on line %d

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