File:  [ELWIX - Embedded LightWeight unIX -] / embedaddon / php / ext / reflection / tests / bug64239.phpt
Revision 1.1.1.1 (vendor branch): download - view: text, annotated - select for diffs - revision graph
Mon Jul 22 01:32:00 2013 UTC (11 years, 1 month ago) by misho
Branches: php, MAIN
CVS tags: v5_4_29p0, v5_4_29, v5_4_20p0, v5_4_20, v5_4_17, HEAD
5.4.17

--TEST--
Bug #64239 (ReflectionClass::getMethods() changed behavior)
--FILE--
<?php
class A {
	use T2 { t2method as Bmethod; }
}
trait T2 {
	public function t2method() {
	}
}

class B extends A{
}

$obj = new ReflectionClass("B");
print_r($obj->getMethods());
print_r(($method = $obj->getMethod("Bmethod")));
var_dump($method->getName());
var_dump($method->getShortName());
?>
--EXPECT--
Array
(
    [0] => ReflectionMethod Object
        (
            [name] => Bmethod
            [class] => A
        )

    [1] => ReflectionMethod Object
        (
            [name] => t2method
            [class] => A
        )

)
ReflectionMethod Object
(
    [name] => Bmethod
    [class] => A
)
string(7) "Bmethod"
string(7) "Bmethod"

FreeBSD-CVSweb <freebsd-cvsweb@FreeBSD.org>