Last Updated: February 25, 2016
·
510
· rwellens

Test if method have annotation with PhpUnit

$reflectionClass = new \ReflectionClass('MyClass);
$method = $reflectionClass->getMethod('MyMethod');
$this->assertContains('@MyAnnotation',$method->getDocComment());