diff options
Diffstat (limited to 'Zend/tests/access_modifiers_010.phpt')
-rw-r--r-- | Zend/tests/access_modifiers_010.phpt | 31 |
1 files changed, 31 insertions, 0 deletions
diff --git a/Zend/tests/access_modifiers_010.phpt b/Zend/tests/access_modifiers_010.phpt new file mode 100644 index 0000000..637ea36 --- /dev/null +++ b/Zend/tests/access_modifiers_010.phpt @@ -0,0 +1,31 @@ +--TEST-- +Testing visibility of methods +--FILE-- +<?php + +class d { + private function test2() { + print "Bar\n"; + } +} + +abstract class a extends d { + public function test() { + $this->test2(); + } +} + +abstract class b extends a { +} + +class c extends b { + public function __construct() { + $this->test(); + } +} + +new c; + +?> +--EXPECTF-- +Fatal error: Call to private method d::test2() from context 'a' in %s on line %d |