mirror of
https://github.com/php/php-src.git
synced 2024-09-23 19:07:26 +00:00
- Add test
This commit is contained in:
parent
c878774f2e
commit
85910d510b
30
ext/reflection/tests/bug41061.phpt
Executable file
30
ext/reflection/tests/bug41061.phpt
Executable file
@ -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===
|
Loading…
Reference in New Issue
Block a user