Add test for docblock parsing

This commit is contained in:
Andreas Frömer 2020-05-04 15:56:40 +02:00 committed by Ondřej Mirtes
parent c8fef049d3
commit ba7df7e621

View File

@ -3054,6 +3054,30 @@ chunk. Must be higher that in the previous request.'),
new PhpDocTagNode('@param', new InvalidTagValueNode('Foo::** $a', new \PHPStan\PhpDocParser\Parser\ParserException('*', Lexer::TOKEN_WILDCARD, 17, Lexer::TOKEN_VARIABLE))),
]),
];
yield [
'multiline generic types',
'/**' . PHP_EOL .
' * @implements Foo<' . PHP_EOL .
' * A, B' . PHP_EOL .
' * >' . PHP_EOL .
' */',
new PhpDocNode([
new PhpDocTagNode(
'@implements',
new ImplementsTagValueNode(
new GenericTypeNode(
new IdentifierTypeNode('Foo'),
[
new IdentifierTypeNode('A'),
new IdentifierTypeNode('B'),
]
),
''
)
),
]),
];
}
public function dataParseTagValue(): array