From 72f15d17b612227207f8884f2e6e150f18b3f9d6 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..0d6f4d980 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 [ + 'DateTime>', + $type('DateTime', [null, null, ['name' => 'array', 'params' => ['Y-m-d\TH:i:s', 'Y-m-d\TH:i:sP']]]), + ]; yield [ 'a,e>', $type('a', [['name' => 'b', 'params' => [['name' => 'c', 'params' => []], ['name' => 'd', 'params' => []]]], ['name' => 'e', 'params' => []]]),