/** * Create annotations from the tokenized input string. * * @return AnnotationList A list of annotation instances or an empty list if no annotation was found. */ private function getAnnotations() { $annotations = new AnnotationList(array()); while (($annotation = $this->getAnnotation()) !== null) { $annotations->addAnnotation($annotation); } return $annotations; }
/** * Test if the method `hasAnnotations` returns false on not existing annotation. */ public function testIfHasAnnotationsReturnsFalse() { $list = new AnnotationList(); $result = $list->hasAnnotations('NotExisting'); $this->assertFalse($result); }