mirror of
https://github.com/danog/phpdoc-parser.git
synced 2024-11-26 20:15:11 +01:00
Add parse error test
This commit is contained in:
parent
9b27b84656
commit
8c4ef2aefd
@ -447,6 +447,24 @@ class TypeParserTest extends \PHPUnit\Framework\TestCase
|
||||
Lexer::TOKEN_CLOSE_CURLY_BRACKET
|
||||
),
|
||||
],
|
||||
[
|
||||
'array{"a": int}',
|
||||
new \PHPStan\PhpDocParser\Parser\ParserException(
|
||||
'"a"',
|
||||
Lexer::TOKEN_DOUBLE_QUOTED_STRING,
|
||||
6,
|
||||
Lexer::TOKEN_IDENTIFIER
|
||||
),
|
||||
],
|
||||
[
|
||||
'array{\'a\': int}',
|
||||
new \PHPStan\PhpDocParser\Parser\ParserException(
|
||||
'\'a\'',
|
||||
Lexer::TOKEN_SINGLE_QUOTED_STRING,
|
||||
6,
|
||||
Lexer::TOKEN_IDENTIFIER
|
||||
),
|
||||
],
|
||||
[
|
||||
'callable(): Foo',
|
||||
new CallableTypeNode(
|
||||
|
Loading…
Reference in New Issue
Block a user