public checkIfClassCommentContainsHideAnnotation ( ReflectionClass $rClass ) : boolean | ||
$rClass | ReflectionClass | instance of ReflectionMethod |
Результат | boolean |
public function checkIfClassCommentContainsHideAnnotation(ReflectionClass $rClass)
{
return false !== strstr($rClass->getDocComment(), '@hide');
}
public function test_CheckIfModule_ContainsHideAnnotation() { $annotation = '@hideExceptForSuperUser test test'; $mock = $this->getMockBuilder('ReflectionClass')->disableOriginalConstructor()->setMethods(array('getDocComment'))->getMock(); $mock->expects($this->once())->method('getDocComment')->willReturn($annotation); $documentationGenerator = new DocumentationGenerator(); $this->assertTrue($documentationGenerator->checkIfClassCommentContainsHideAnnotation($mock)); }