Last Updated: February 25, 2016
·
570
· rwellens

Test if method have annotation with PhpUnit

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