diff --git a/tests/PHPStan/Parser/TypeParserTest.php b/tests/PHPStan/Parser/TypeParserTest.php index d09e73e4..a9e5e8df 100644 --- a/tests/PHPStan/Parser/TypeParserTest.php +++ b/tests/PHPStan/Parser/TypeParserTest.php @@ -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(