zeev            Mon Jul 21 07:48:37 2003 EDT

  Added files:                 
    /php-src/tests/lang 036.phpt 037.phpt 
  Log:
  Add a couple of tests
  
  

Index: php-src/tests/lang/036.phpt
+++ php-src/tests/lang/036.phpt
--TEST--
Child public element should not override parent private element in parent methods
--FILE--
<?php
class par {
        private $id = "foo";

        function displayMe()
        {
                print $this->id;
        }
};

class chld extends par {
        public $id = "bar";
        function displayHim()
        {
                parent::displayMe();
        }
};


$obj = new chld();
$obj->displayHim();
?>
--EXPECT--
foo

Index: php-src/tests/lang/037.phpt
+++ php-src/tests/lang/037.phpt
--TEST--
'Static' binding for private variables
--FILE--
<?php

class par {
        private $id="foo";

        function displayMe()
        {
                $this->displayChild();
        }
};

class chld extends par {
        private $id = "bar";

        function displayChild()
        {
                print $this->id;
        }
};


$obj = new chld();
$obj->displayMe();

?>
--EXPECT--
bar



-- 
PHP CVS Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php

Reply via email to