Permalink
Browse files

Add test. Class not be included when it in @ignoreAnnotation

  • Loading branch information...
1 parent d514e39 commit 5fc86b3ef4d7e39f739bd2eec1aa3627aa1c1155 @f1nder committed Dec 10, 2012
@@ -253,6 +253,13 @@ public function testNonAnnotationProblem()
$this->assertInstanceOf($name, $annot);
}
+ public function testIncludeIgnoreAnnotation()
+ {
+ $reader = $this->getReader();
+ $reader->getPropertyAnnotations(new \ReflectionProperty('Doctrine\Tests\Common\Annotations\Fixtures\ClassWithIgnoreAnnotation', 'foo'));
+ $this->assertFalse(class_exists('Doctrine\Tests\Common\Annotations\Fixtures\IgnoreAnnotationClass', false));
+ }
+
public function testImportWithConcreteAnnotation()
{
$reader = $this->getReader();
@@ -0,0 +1,14 @@
+<?php
+
+namespace Doctrine\Tests\Common\Annotations\Fixtures;
+
+/**
+ * @ignoreAnnotation("IgnoreAnnotationClass")
+ */
+class ClassWithIgnoreAnnotation
+{
+ /**
+ * @IgnoreAnnotationClass
+ */
+ public $foo;
+}
@@ -0,0 +1,5 @@
+<?php
+
+namespace Doctrine\Tests\Common\Annotations\Fixtures;
+
+class IgnoreAnnotationClass{}
@@ -69,6 +69,14 @@ public function testInvalidAnnotationUsageButIgnoredClass()
}
/**
+ * @expectedException Doctrine\Common\Annotations\AnnotationException
+ */
+ public function testIncludeIgnoreAnnotation()
+ {
+ parent::testIncludeIgnoreAnnotation();
+ }
+
+ /**
* @group DDC-1660
* @group regression
*

0 comments on commit 5fc86b3

Please sign in to comment.