Permalink
Browse files

DDC-168 Added coverage to ignored non annotations imports.

  • Loading branch information...
1 parent 510afad commit 01ddf2cfa8aaf08d1f22d535471b62b039df1222 @guilhermeblanco guilhermeblanco committed Apr 24, 2014
Showing with 13 additions and 0 deletions.
  1. +13 −0 tests/Doctrine/Tests/Common/Annotations/DocParserTest.php
@@ -955,6 +955,19 @@ public function testAnnotationWithoutClassIsIgnoredWithoutWarning()
$this->assertEquals(0, count($result));
}
+
+ /**
+ * @group DCOM-168
+ */
+ public function testNotAnAnnotationClassIsIgnoredWithoutWarning()
+ {
+ $parser = new DocParser();
+ $parser->setIgnoreNotImportedAnnotations(true);
+ $parser->setIgnoredAnnotationNames(array('PHPUnit_Framework_TestCase' => true));
@bfanger

bfanger Apr 30, 2014

Contributor

Why are you explicitly blacklisting PHPUnit_Framework_TestCase? shouldn't setIgnoreNotImportedAnnotations(true) just ignore all "not imported annotations"

@Ocramius

Ocramius Apr 30, 2014

Owner

@bfanger the PHPUnit_Framework_TestCase class exists.

@bfanger

bfanger Apr 30, 2014

Contributor

True, but is it isn't passed to setImports(), so it should be ignored anyway.

+ $result = $parser->parse('@PHPUnit_Framework_TestCase');
+
+ $this->assertEquals(0, count($result));
+ }
/**
* @expectedException \Doctrine\Common\Annotations\AnnotationException

0 comments on commit 01ddf2c

Please sign in to comment.