added test for generic tag to parse description with 0 as expected

This commit is contained in:
Michael Knappe
2019-04-30 13:22:06 +02:00
parent 095cf6d37a
commit 6907decc71
@@ -44,4 +44,18 @@ DOCCOMMENT;
$this->assertCount(3, $docblock->getTags()); $this->assertCount(3, $docblock->getTags());
} }
public function testDocblockWithAnnotationHavingZeroValue(): void
{
$docComment = <<<DOCCOMMENT
/**
* @my-tag 0
*/
DOCCOMMENT;
$factory = DocBlockFactory::createInstance();
$docblock = $factory->create($docComment);
$this->assertSame(0, printf('%i', $docblock->getTagsByName('my-tag')));
}
} }