cvs: ZendEngine2 /tests access_modifiers_008.phpt

[email protected] ("Felipe Pena")
Newsgroups php.zend-engine.cvs
Message-ID <cvsfelipe1205254120@cvsserver>
felipe		Tue Mar 11 16:48:40 2008 UTC

  Modified files:              
    /ZendEngine2/tests	access_modifiers_008.phpt 
  Log:
  Add new test (bug reported in internals list by Robin)
  
http://cvs.php.net/viewvc.cgi/ZendEngine2/tests/access_modifiers_008.phpt?r1=1.1&r2=1.2&diff_format=u
Index: ZendEngine2/tests/access_modifiers_008.phpt
diff -u /dev/null ZendEngine2/tests/access_modifiers_008.phpt:1.2
--- /dev/null	Tue Mar 11 16:48:40 2008
+++ ZendEngine2/tests/access_modifiers_008.phpt	Tue Mar 11 16:48:40 2008
@@ -0,0 +1,19 @@
+--TEST--
+Inconsistencies when accessing protected members
+--FILE--
+<?php
+
+class A {
+	static protected function f() {return 'A::f()';}
+}
+class B1 extends A {
+	static protected function f() {return 'B1::f()';}
+}
+class B2 extends A {
+	static public function test() {echo B1::f();}
+}
+B2::test();
+
+?>
+--EXPECTF--
+Fatal error: Call to protected method B1::f() from context 'B2' in %s on line %d
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.