summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--ext/reflection/tests/ReflectionMethod_getPrototype_basic.phpt29
1 files changed, 29 insertions, 0 deletions
diff --git a/ext/reflection/tests/ReflectionMethod_getPrototype_basic.phpt b/ext/reflection/tests/ReflectionMethod_getPrototype_basic.phpt
new file mode 100644
index 0000000000..c57a529d7b
--- /dev/null
+++ b/ext/reflection/tests/ReflectionMethod_getPrototype_basic.phpt
@@ -0,0 +1,29 @@
+--TEST--
+public ReflectionMethod ReflectionMethod::getPrototype ( void );
+--CREDITS--
+marcosptf - <marcosptf@yahoo.com.br>
+--FILE--
+<?php
+class Hello {
+ public function sayHelloTo($name) {
+ return 'Hello ' . $name;
+ }
+}
+
+class HelloWorld extends Hello {
+ public function sayHelloTo($name) {
+ return 'Hello world: ' . $name;
+ }
+}
+
+$reflectionMethod = new ReflectionMethod('HelloWorld', 'sayHelloTo');
+var_dump($reflectionMethod->getPrototype());
+
+?>
+--EXPECT--
+object(ReflectionMethod)#2 (2) {
+ ["name"]=>
+ string(10) "sayHelloTo"
+ ["class"]=>
+ string(5) "Hello"
+}