]> granicus.if.org Git - php/commitdiff
add test for bug #36337
authorAntony Dovgal <tony2001@php.net>
Tue, 14 Feb 2006 09:46:16 +0000 (09:46 +0000)
committerAntony Dovgal <tony2001@php.net>
Tue, 14 Feb 2006 09:46:16 +0000 (09:46 +0000)
ext/reflection/tests/bug36337.phpt [new file with mode: 0644]

diff --git a/ext/reflection/tests/bug36337.phpt b/ext/reflection/tests/bug36337.phpt
new file mode 100644 (file)
index 0000000..f4d78f9
--- /dev/null
@@ -0,0 +1,28 @@
+--TEST--
+Bug #36337 (ReflectionProperty fails to return correct visibility)
+--FILE--
+<?php
+
+abstract class enum {
+    protected $_values;
+
+    public function __construct() {
+        $property = new ReflectionProperty(get_class($this),'_values');
+        var_dump($property->isProtected());
+    }
+
+}
+
+final class myEnum extends enum {
+    public $_values = array(
+           0 => 'No value',
+       );
+}
+
+$x = new myEnum();
+
+echo "Done\n";
+?>
+--EXPECT--     
+bool(false)
+Done