From ba4d54e214e3a479771132ed578b8963a34133d3 Mon Sep 17 00:00:00 2001 From: Daniil Gentili Date: Sat, 5 Nov 2022 14:36:49 +0100 Subject: [PATCH] Add basic test --- tests/Functional/Type/Parser/Lexer/NativeLexerTest.php | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/tests/Functional/Type/Parser/Lexer/NativeLexerTest.php b/tests/Functional/Type/Parser/Lexer/NativeLexerTest.php index 88c98c0..2dd053f 100644 --- a/tests/Functional/Type/Parser/Lexer/NativeLexerTest.php +++ b/tests/Functional/Type/Parser/Lexer/NativeLexerTest.php @@ -628,6 +628,13 @@ final class NativeLexerTest extends TestCase 'type' => ShapedArrayType::class, ]; + + yield 'Strict shaped array' => [ + 'raw' => 'strict-array{foo: string}', + 'transformed' => 'array{foo: string}', + 'type' => ShapedArrayType::class, + ]; + yield 'Shaped array with single quote key' => [ 'raw' => "array{'foo': string}", 'transformed' => "array{'foo': string}",