Skip to content

Commit

Permalink
Add parse error test
Browse files Browse the repository at this point in the history
  • Loading branch information
arnaud-lb authored and ondrejmirtes committed Jun 7, 2019
1 parent 9b27b84 commit 8c4ef2a
Showing 1 changed file with 18 additions and 0 deletions.
18 changes: 18 additions & 0 deletions tests/PHPStan/Parser/TypeParserTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -447,6 +447,24 @@ public function provideParseData(): array
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(
Expand Down

0 comments on commit 8c4ef2a

Please sign in to comment.