Ejemplo n.º 1
0
 public function testHasPropertyAnnotation()
 {
     $this->assertTrue(AnnotationReader::hasPropertyTag($this->class, $this->prop, 'tagwithoutvalue'));
     $this->assertTrue(AnnotationReader::hasPropertyTag($this->class, $this->prop, 'tagwithvalue'));
     $this->assertFalse(AnnotationReader::hasPropertyTag($this->class, $this->prop, 'notatag'));
     $this->assertFalse(AnnotationReader::hasPropertyTag($this->class, $this->prop, 'nonexisting'));
 }
Ejemplo n.º 2
0
 public function isValid($class, $property)
 {
     // @todo depends on annotation reader, add di
     return AnnotationReader::hasPropertyTag($class, $property, 'primary-key');
 }