com php-src: Add test for ReflectionMethod::getPrototype_ basic(): ext/reflection/tests/ReflectionMethod_getPro totype_basic.phpt

From: Date: Tue, 01 Sep 2015 22:28:46 +0000
Subject: com php-src: Add test for ReflectionMethod::getPrototype_ basic(): ext/reflection/tests/ReflectionMethod_getPro totype_basic.phpt
Groups: php.cvs 
Request: Send a blank email to php-cvs+get-88850@lists.php.net to get a copy of this message
Commit: 519016096f911428778d0b88b8701e4d72e88bee Author: marcosptf <marcosptf@yahoo.com.br> Tue, 25 Aug 2015 01:22:42 -0300 Committer: Christoph M. Becker <cmb@php.net> Wed, 2 Sep 2015 00:28:46 +0200 Parents: c98b88aafe9d71839274f978e3e62e2a76a49e04 Branches: master Link: http://git.php.net/?p=php-src.git;a=commitdiff;h=519016096f911428778d0b88b8701e4d72e88bee Log: Add test for ReflectionMethod::getPrototype_basic() Changed paths: A ext/reflection/tests/ReflectionMethod_getPrototype_basic.phpt Diff: diff --git a/ext/reflection/tests/ReflectionMethod_getPrototype_basic.phpt b/ext/reflection/tests/ReflectionMethod_getPrototype_basic.phpt new file mode 100644 index 0000000..c57a529 --- /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" +}

« previous php.cvs (#88850) next »