/** * @Annotation * @param test */ public function testReadAnnotationNoLowercase() { $reader = new ControllerMethodReflector(); $reader->reflect('\\OC\\AppFramework\\Utility\\ControllerMethodReflectorTest', 'testReadAnnotationNoLowercase'); $this->assertTrue($reader->hasAnnotation('Annotation')); $this->assertFalse($reader->hasAnnotation('param')); }
/** * Validate vehicle data if @ValidateVehicle is used * * @param type $controller * @param type $methodName */ public function beforeController($controller, $methodName) { if ($this->reflector->hasAnnotation($this->annotation)) { $this->validate(); if ($this->validator->fails()) { throw new ValidationException($this->validator); } } }
public function testInheritanceOverrideNoDocblock() { $reader = new ControllerMethodReflector(); $reader->reflect('OC\\AppFramework\\Utility\\EndController', 'test3'); $this->assertFalse($reader->hasAnnotation('Annotation')); }