From cc6426794e4d82fdb4bbb4542c1231ba22f10e76 Mon Sep 17 00:00:00 2001 From: Sebastian Schreiber Date: Thu, 18 Feb 2021 21:32:20 +0100 Subject: [PATCH] [TASK] Add testcase for docblock with number Relates: #59 --- tests/PHPStan/Parser/PhpDocParserTest.php | 15 +++++++++++++++ 1 file changed, 15 insertions(+) diff --git a/tests/PHPStan/Parser/PhpDocParserTest.php b/tests/PHPStan/Parser/PhpDocParserTest.php index abc6e552..79b55e4a 100644 --- a/tests/PHPStan/Parser/PhpDocParserTest.php +++ b/tests/PHPStan/Parser/PhpDocParserTest.php @@ -53,6 +53,7 @@ protected function setUp(): void /** + * @dataProvider provideTagsWithNumbers * @dataProvider provideParamTagsData * @dataProvider provideVarTagsData * @dataProvider provideReturnTagsData @@ -3219,6 +3220,20 @@ public function dataParseTagValue(): array ]; } + public function provideTagsWithNumbers(): \Iterator + { + yield [ + 'OK without description and tag with number in it', + '/** @special3 Foo */', + new PhpDocNode([ + new PhpDocTagNode( + '@special3', + new GenericTagValueNode('Foo') + ), + ]), + ]; + } + /** * @dataProvider dataParseTagValue * @param string $tag