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

1.1       misho       1: --TEST--
                      2: Visibility can be changed with the as aliasing construct as well.
                      3: --FILE--
                      4: <?php
                      5: error_reporting(E_ALL);
                      6: 
                      7: trait HelloWorld {
                      8:    public function sayHello() {
                      9:      echo 'Hello World!';
                     10:    }
                     11: }
                     12: 
                     13: class MyClass {
                     14:    use HelloWorld { sayHello as protected; }
                     15: }
                     16: 
                     17: 
                     18: $o = new MyClass;
                     19: $o->sayHello();
                     20: 
                     21: ?>
                     22: --EXPECTF--    
                     23: Fatal error: Call to protected method MyClass::sayHello() from context '' in %s on line %d

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