]> granicus.if.org Git - php/commitdiff
- Add test
authorJohannes Schlüter <johannes@php.net>
Thu, 12 Apr 2007 18:31:57 +0000 (18:31 +0000)
committerJohannes Schlüter <johannes@php.net>
Thu, 12 Apr 2007 18:31:57 +0000 (18:31 +0000)
ext/reflection/tests/bug41061.phpt [new file with mode: 0755]

diff --git a/ext/reflection/tests/bug41061.phpt b/ext/reflection/tests/bug41061.phpt
new file mode 100755 (executable)
index 0000000..977828e
--- /dev/null
@@ -0,0 +1,30 @@
+--TEST--
+Reflection Bug #41061 ("visibility error" in ReflectionFunction::export())
+--SKIPIF--
+<?php extension_loaded('reflection') or die('skip'); ?>
+--FILE--
+<?php
+
+function foo() {
+}
+class bar {
+    private function foo() {
+    }
+}
+
+Reflection::export(new ReflectionFunction('foo'));
+Reflection::export(new ReflectionMethod('bar', 'foo'));
+?>
+===DONE===
+<?php exit(0); ?>
+--EXPECTF--
+Function [ <user> function foo ] {
+  @@ %sbug41061.php 3 - 4
+}
+
+Method [ <user> private method foo ] {
+  @@ %sbug41061.php 7 - 8
+}
+
+===DONE===