From: Zeev Suraski Date: Mon, 21 Jul 2003 11:48:37 +0000 (+0000) Subject: Add a couple of tests X-Git-Tag: BEFORE_ARG_INFO~156 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=9bbf5577dd828302ab9717f383eaf574eb798630;p=php Add a couple of tests --- diff --git a/tests/lang/036.phpt b/tests/lang/036.phpt new file mode 100755 index 0000000000..474316e363 --- /dev/null +++ b/tests/lang/036.phpt @@ -0,0 +1,27 @@ +--TEST-- +Child public element should not override parent private element in parent methods +--FILE-- +id; + } +}; + +class chld extends par { + public $id = "bar"; + function displayHim() + { + parent::displayMe(); + } +}; + + +$obj = new chld(); +$obj->displayHim(); +?> +--EXPECT-- +foo diff --git a/tests/lang/037.phpt b/tests/lang/037.phpt new file mode 100755 index 0000000000..c2a1ee312f --- /dev/null +++ b/tests/lang/037.phpt @@ -0,0 +1,30 @@ +--TEST-- +'Static' binding for private variables +--FILE-- +displayChild(); + } +}; + +class chld extends par { + private $id = "bar"; + + function displayChild() + { + print $this->id; + } +}; + + +$obj = new chld(); +$obj->displayMe(); + +?> +--EXPECT-- +bar