Skip to content

Commit bdd9f73

Browse files
Michael Knappejaapio
Michael Knappe
authored andcommitted
added test for generic tag to parse description with 0 as expected
1 parent ace259a commit bdd9f73

File tree

1 file changed

+14
-0
lines changed

1 file changed

+14
-0
lines changed

tests/integration/DocblocksWithAnnotationsTest.php

+14
Original file line numberDiff line numberDiff line change
@@ -43,4 +43,18 @@ public function testDocblockWithAnnotations()
4343

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

0 commit comments

Comments
 (0)