public function testIfHasMethodAnnotationFromInterface() { // Check base model first $info = new ReflectionAnnotatedMethod(BaseInterfaceWithLabel::class, 'getTitle'); $has = $info->hasAnnotation('Label'); $this->assertTrue($has); // Check inherited model model $model = new ModelWithInheritedLabelFromInterface(); $info = new ReflectionAnnotatedMethod($model, 'getTitle'); $has = $info->hasAnnotation('Label'); $this->assertTrue($has); }
public function testIfHasMethodAnnotationFromParentClassParent() { // Check base model first $model = new BaseModelWithLabel(); $info = new ReflectionAnnotatedMethod($model, 'getTitle'); $has = $info->hasAnnotation('Label'); $this->assertTrue($has); // Check inherited model model $model = new ModelWithInheritedLabelDeep(); $info = new ReflectionAnnotatedMethod($model, 'getTitle'); $has = $info->hasAnnotation('Label'); $this->assertTrue($has); }