From 0ff06b7af3b8b5a10c32967f58c21126861c3fd6 Mon Sep 17 00:00:00 2001 From: Vincent Langlet Date: Sun, 11 Aug 2019 23:04:40 +0200 Subject: [PATCH] Add tests for array of DateTime --- tests/Serializer/Type/ParserTest.php | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/tests/Serializer/Type/ParserTest.php b/tests/Serializer/Type/ParserTest.php index 9ceec0d6d..1bc5ffec2 100644 --- a/tests/Serializer/Type/ParserTest.php +++ b/tests/Serializer/Type/ParserTest.php @@ -79,6 +79,10 @@ public function validTypesProvider(): iterable 'array', $type('array', [['name' => 'Foo\Bar', 'params' => []], ['name' => 'Baz\Boo', 'params' => []]]), ]; + yield [ + 'array, DateTime<\'Y-m-d\TH:i:s+\'>>', + $type('array', [['name' => 'DateTime', 'params' => ['Y-m-d\TH:i:s']], ['name' => 'DateTime', 'params' => ['Y-m-d\TH:i:s+']]]), + ]; yield [ 'a,e>', $type('a', [['name' => 'b', 'params' => [['name' => 'c', 'params' => []], ['name' => 'd', 'params' => []]]], ['name' => 'e', 'params' => []]]),