Created
March 1, 2013 13:53
-
-
Save docteurklein/5064805 to your computer and use it in GitHub Desktop.
failing test case for ReflectionMethod::getPrototype() when a class is using a trait that defines a method, chich class extends another class that defines the same method too.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
trait TestTrait | |
{ | |
public function getKernel() | |
{ | |
} | |
} | |
class BaseTest | |
{ | |
public function getKernel() | |
{ | |
} | |
} | |
class Test extends BaseTest | |
{ | |
use TestTrait; | |
} | |
$refl = new \ReflectionClass('Test'); | |
var_dump($refl->getMethod('getKernel')->getPrototype()); | |
var_dump($refl->getMethod('getKernel')->getPrototype()->getPrototype()->getPrototype()->getPrototype()->getPrototype()->getPrototype()->getPrototype()->getPrototype()->getPrototype()->getPrototype()->getPrototype()); |
sergeyklay
commented
Oct 29, 2013
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment