annotation = new Annotation(); $this->annotation->addParserTag(new TestTagOne()); $this->annotation->addParserTag(new TestTagTwo()); parent::__construct($name, $data, $dataName); } function testProperty() { $ret = $this->annotation->getAnnotation((new \ReflectionClass(static::class))->getProperty('property')); $this->assertEquals('myKey',$ret['TestTagOne'][0]->key); } }