Last Updated: February 25, 2016
·
554
· rwellens

Test if method have annotation with PhpUnit

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