mirror of
https://github.com/barryvdh/ReflectionDocBlock.git
synced 2026-08-18 01:57:13 +00:00
added test for generic tag to parse description with 0 as expected
This commit is contained in:
@@ -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')));
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user