cvs: ZendEngine2 /tests bug29689.phpt
| From: | Dmitry Stogov | Date: | Fri, 10 Jun 2005 10:23:37 +0000 |
| Subject: | cvs: ZendEngine2 /tests bug29689.phpt | ||
| Groups: | php.zend-engine.cvs | ||
| Request: | Send a blank email to php-zend-engine-cvs+get-3791@lists.php.net to get a copy of this message | ||
dmitry Fri Jun 10 06:23:37 2005 EDT
Modified files:
/ZendEngine2/tests bug29689.phpt
Log:
typos
http://cvs.php.net/diff.php/ZendEngine2/tests/bug29689.phpt?r1=1.3&r2=1.4&ty=u
Index: ZendEngine2/tests/bug29689.phpt
diff -u ZendEngine2/tests/bug29689.phpt:1.3 ZendEngine2/tests/bug29689.phpt:1.4
--- ZendEngine2/tests/bug29689.phpt:1.3 Thu Jun 9 13:20:44 2005
+++ ZendEngine2/tests/bug29689.phpt Fri Jun 10 06:23:37 2005
@@ -1,57 +1,57 @@
---TEST--
-Bug #29689 (default value of protected member overrides default value of private)
---FILE--
-<?php
-class foo {
- private $foo = 'foo';
+--TEST--
+Bug #29689 (default value of protected member overrides default value of private)
+--FILE--
+<?php
+class foo {
+ private $foo = 'foo';
private $foo2 = 'foo2';
-
- function printFoo()
- {
+
+ function printFoo()
+ {
echo __CLASS__, ': ', $this->foo, " ", $this->foo2,
"\n";
- }
-}
-
-class bar extends foo {
- protected $foo = 'bar';
-
- function printFoo()
- {
- parent::printFoo();
+ }
+}
+
+class bar extends foo {
+ protected $foo = 'bar';
+
+ function printFoo()
+ {
+ parent::printFoo();
echo __CLASS__, ': ', $this->foo, " ", $this->foo2,
"\n";
- }
-}
-
-class baz extends bar {
- protected $foo = 'baz';
+ }
+}
+
+class baz extends bar {
+ protected $foo = 'baz';
protected $foo2 = 'baz2';
-}
-
-class bar2 extends foo {
- function printFoo()
- {
- parent::printFoo();
+}
+
+class bar2 extends foo {
+ function printFoo()
+ {
+ parent::printFoo();
echo __CLASS__, ': ', $this->foo, " ", $this->foo2,
"\n";
- }
-}
-
-class baz2 extends bar2 {
- protected $foo = 'baz2';
+ }
+}
+
+class baz2 extends bar2 {
+ protected $foo = 'baz2';
protected $foo2 = 'baz22';
-}
-
-$bar = new bar;
-$bar->printFoo();
+}
+
+$bar = new bar;
+$bar->printFoo();
echo "---baz--\n";
-$baz = new baz();
-$baz->printFoo();
+$baz = new baz();
+$baz->printFoo();
echo "---baz2--\n";
-$baz = new baz2();
-$baz->printFoo();
-?>
+$baz = new baz2();
+$baz->printFoo();
+?>
--EXPECTF--
foo: foo foo2
-bar: bar
+bar: bar
Notice: Undefined property: bar::$foo2 in %s on line %d
---baz--