3 namespace Doctrine\Tests\Common\Annotations\Ticket;
5 use Doctrine\Tests\Common\Annotations\Fixtures\Controller;
10 class DCOM55Test extends \PHPUnit_Framework_TestCase
13 * @expectedException Doctrine\Common\Annotations\AnnotationException
14 * @expectedExceptionMessage [Semantical Error] The class "Doctrine\Tests\Common\Annotations\Fixtures\Controller" is not annotated with @Annotation. Are you sure this class can be used as annotation? If so, then you need to add @Annotation to the _class_ doc comment of "Doctrine\Tests\Common\Annotations\Fixtures\Controller". If it is indeed no annotation, then you need to add @IgnoreAnnotation("Controller") to the _class_ doc comment of class Doctrine\Tests\Common\Annotations\Ticket\Dummy.
16 public function testIssue()
18 $class = new \ReflectionClass(__NAMESPACE__ . '\\Dummy');
19 $reader = new \Doctrine\Common\Annotations\AnnotationReader();
20 $reader->getClassAnnotations($class);
23 public function testAnnotation()
25 $class = new \ReflectionClass(__NAMESPACE__ . '\\DCOM55Consumer');
26 $reader = new \Doctrine\Common\Annotations\AnnotationReader();
27 $annots = $reader->getClassAnnotations($class);
29 $this->assertEquals(1, count($annots));
30 $this->assertInstanceOf(__NAMESPACE__.'\\DCOM55Annotation', $annots[0]);
33 public function testParseAnnotationDocblocks()
35 $class = new \ReflectionClass(__NAMESPACE__ . '\\DCOM55Annotation');
36 $reader = new \Doctrine\Common\Annotations\AnnotationReader();
37 $annots = $reader->getClassAnnotations($class);
39 $this->assertEquals(0, count($annots));
54 class DCOM55Annotation