Permalink
Browse files

Fixed the unit test for wildcard support on ignore annotation

  • Loading branch information...
1 parent b145671 commit cefb0d8161fac0c0d67eab5e9c78b0e37f34f839 @ezimuel committed Jun 25, 2012
@@ -325,22 +325,7 @@ public function testInvalidAnnotationButIgnored()
$this->assertCount(0, $reader->getMethodAnnotations($class->getMethod('bar')));
$this->assertCount(0, $reader->getPropertyAnnotations($class->getProperty('foo')));
}
-
- public function testSupportWildcardIgnoredAnnotation()
- {
- $reader = $this->getReader();
- AnnotationReader::addGlobalIgnoredName('Foo\\*');
-
- $class = new \ReflectionClass('Doctrine\Tests\Common\Annotations\Fixtures\IgnoreAnnotationWithWildcard');
- $annots = $reader->getClassAnnotations($class);
-
- if (!empty($annots)) {
- $this->assertEquals('foo', $annots[0]->bar);
- } else {
- $this->markTestSkipped('Skipped support wildcard ignored annotation');
- }
- }
-
+
abstract protected function getReader();
}
@@ -10,4 +10,16 @@ protected function getReader()
{
return new AnnotationReader();
}
+
+ public function testSupportWildcardIgnoredAnnotation()
+ {
+ $reader = $this->getReader();
+ AnnotationReader::addGlobalIgnoredName('Foo\\*');
+
+ $class = new \ReflectionClass('Doctrine\Tests\Common\Annotations\Fixtures\IgnoreAnnotationWithWildcard');
+ $annots = $reader->getClassAnnotations($class);
+
+ $this->assertEquals('foo', $annots[0]->bar);
+ $this->assertEquals('bar', $annots[1]->foo);
+ }
}

0 comments on commit cefb0d8

Please sign in to comment.