Skip to content

Commit 6907dec

Browse files
author
Michael Knappe
committed
added test for generic tag to parse description with 0 as expected
1 parent 095cf6d commit 6907dec

File tree

1 file changed

+14
-0
lines changed

1 file changed

+14
-0
lines changed

tests/integration/DocblocksWithAnnotationsTest.php

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -44,4 +44,18 @@ public function testDocblockWithAnnotations(): void
4444

4545
$this->assertCount(3, $docblock->getTags());
4646
}
47+
48+
public function testDocblockWithAnnotationHavingZeroValue(): void
49+
{
50+
$docComment = <<<DOCCOMMENT
51+
/**
52+
* @my-tag 0
53+
*/
54+
DOCCOMMENT;
55+
56+
$factory = DocBlockFactory::createInstance();
57+
$docblock = $factory->create($docComment);
58+
59+
$this->assertSame(0, printf('%i', $docblock->getTagsByName('my-tag')));
60+
}
4761
}

0 commit comments

Comments
 (0)