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

1.1       misho       1: --TEST--
                      2: Bug #48533 (__callStatic is not invoked for private/protected methods)
                      3: --FILE--
                      4: <?php
                      5: 
                      6: class foo {
                      7:        private function a() {
                      8:                var_dump(1);    
                      9:        }
                     10:        public function b() {
                     11:                var_dump(2);
                     12:        }
                     13:        protected function c() {
                     14:                var_dump(3);
                     15:        }
                     16:        static function __callstatic($a, $b) {
                     17:                var_dump('__callStatic::'. $a);
                     18:        }
                     19:        public function __call($a, $b) {
                     20:                var_dump('__call::'. $a);
                     21:        }
                     22: }
                     23: 
                     24: $x = new foo;
                     25: $x->a();
                     26: $x->b();
                     27: $x->c();
                     28: $x::a();
                     29: $x::b();
                     30: $x::c();
                     31: 
                     32: ?>
                     33: --EXPECTF--
                     34: %unicode|string%(9) "__call::a"
                     35: int(2)
                     36: %unicode|string%(9) "__call::c"
                     37: %unicode|string%(15) "__callStatic::a"
                     38: 
                     39: Strict Standards: Non-static method foo::b() should not be called statically in %s on line %d
                     40: int(2)
                     41: %unicode|string%(15) "__callStatic::c"

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