Annotation of embedaddon/php/Zend/tests/traits/methods_002.phpt, revision 1.1

1.1     ! misho       1: --TEST--
        !             2: Testing collision with magic methods
        !             3: --FILE--
        !             4: <?php
        !             5: 
        !             6: trait foo {    
        !             7:        public function __clone() {
        !             8:                var_dump(__FUNCTION__);
        !             9:        }
        !            10: }
        !            11: 
        !            12: trait baz {
        !            13:        public function __clone() {
        !            14:                var_dump(__FUNCTION__);
        !            15:        }
        !            16: }
        !            17: 
        !            18: class bar {
        !            19:        use foo;
        !            20:        use baz;
        !            21: }
        !            22: 
        !            23: $o = new bar;
        !            24: var_dump(clone $o);
        !            25: 
        !            26: ?>
        !            27: --EXPECTF--
        !            28: Fatal error: Trait method __clone 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>