felipe                                   Sun, 07 Mar 2010 00:57:19 +0000

Revision: http://svn.php.net/viewvc?view=revision&revision=295912

Log:
- New test

Changed paths:
    A   php/php-src/branches/PHP_5_3/Zend/tests/bug50810.phpt
    A   php/php-src/trunk/Zend/tests/bug50810.phpt

Added: php/php-src/branches/PHP_5_3/Zend/tests/bug50810.phpt
===================================================================
--- php/php-src/branches/PHP_5_3/Zend/tests/bug50810.phpt                       
        (rev 0)
+++ php/php-src/branches/PHP_5_3/Zend/tests/bug50810.phpt       2010-03-07 
00:57:19 UTC (rev 295912)
@@ -0,0 +1,46 @@
+--TEST--
+Bug #50810 (property_exists does not work for private)
+--FILE--
+<?php
+
+class ExampleSuperClass
+{
+    private $foo;
+    static protected $bar;
+
+    private function foo()
+    {
+    }
+
+    public function propertyFooExists()
+    {
+        return property_exists($this, 'foo');
+    }
+
+}
+
+class ExampleSubClass extends ExampleSuperClass
+{
+    public function methodExists()
+    {
+        return method_exists($this, 'foo');
+    }
+
+    public function propertyBarExists()
+    {
+        return property_exists($this, 'bar');
+    }
+}
+
+$example = new ExampleSubClass();
+var_dump($example->methodExists());
+var_dump(method_exists($example, 'propertyFooExists'));
+var_dump($example->propertyFooExists());
+var_dump($example->propertyBarExists());
+
+?>
+--EXPECT--
+bool(true)
+bool(true)
+bool(true)
+bool(true)


Property changes on: php/php-src/branches/PHP_5_3/Zend/tests/bug50810.phpt
___________________________________________________________________
Added: svn:keywords
   + Id Rev Revision
Added: svn:eol-style
   + native

Added: php/php-src/trunk/Zend/tests/bug50810.phpt
===================================================================
--- php/php-src/trunk/Zend/tests/bug50810.phpt                          (rev 0)
+++ php/php-src/trunk/Zend/tests/bug50810.phpt  2010-03-07 00:57:19 UTC (rev 
295912)
@@ -0,0 +1,46 @@
+--TEST--
+Bug #50810 (property_exists does not work for private)
+--FILE--
+<?php
+
+class ExampleSuperClass
+{
+    private $foo;
+    static protected $bar;
+
+    private function foo()
+    {
+    }
+
+    public function propertyFooExists()
+    {
+        return property_exists($this, 'foo');
+    }
+
+}
+
+class ExampleSubClass extends ExampleSuperClass
+{
+    public function methodExists()
+    {
+        return method_exists($this, 'foo');
+    }
+
+    public function propertyBarExists()
+    {
+        return property_exists($this, 'bar');
+    }
+}
+
+$example = new ExampleSubClass();
+var_dump($example->methodExists());
+var_dump(method_exists($example, 'propertyFooExists'));
+var_dump($example->propertyFooExists());
+var_dump($example->propertyBarExists());
+
+?>
+--EXPECT--
+bool(true)
+bool(true)
+bool(true)
+bool(true)


Property changes on: php/php-src/trunk/Zend/tests/bug50810.phpt
___________________________________________________________________
Added: svn:keywords
   + Id Rev Revision
Added: svn:eol-style
   + native

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

Reply via email to