/** * Tests that the driver returns null when no Uploadable annotation * is found. */ public function testReadUploadableAnnotationReturnsNullWhenNonePresent() { $reader = $this->getMock('Doctrine\\Common\\Annotations\\Reader'); $reader->expects($this->once())->method('getClassAnnotation')->will($this->returnValue(null)); $entity = new DummyEntity(); $driver = new AnnotationDriver($reader); $annot = $driver->readUploadable(new \ReflectionClass($entity)); $this->assertEquals(null, $annot); }
public function hasAnnotations(\ReflectionClass $class) { return null !== $this->driver->readUploadable($class); }