public function testReflectionAnnotatedMethod() { $reflection = new ReflectionAnnotatedMethod('Example', 'exampleMethod'); $this->assertTrue($reflection->hasAnnotation('FirstAnnotation')); $this->assertFalse($reflection->hasAnnotation('NonExistentAnnotation')); $this->assertInstanceOf('FirstAnnotation', $reflection->getAnnotation('FirstAnnotation')); $this->assertFalse($reflection->getAnnotation('NonExistentAnnotation')); $annotations = $reflection->getAnnotations(); $this->assertEquals(count($annotations), 1); $this->assertInstanceOf('FirstAnnotation', $annotations[0]); $this->assertInstanceOf('Addendum\\ReflectionAnnotatedClass', $reflection->getDeclaringClass()); }