From f639ad2dcb78e84ccd1dce70d9d8bdba41779180 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=D0=9A=D0=BE=D0=BD=D1=81=D1=82=D0=B0=D0=BD=D1=82=D0=B8?= =?UTF-8?q?=D0=BD=20=D0=9C=D0=B0=D0=BB=D0=B8=D0=BD=D0=B8=D0=BD?= Date: Wed, 21 Nov 2018 12:53:52 +0300 Subject: [PATCH] Add test case for wrong of.array.intems.enum validation --- tests/Constraints/OfPropertiesTest.php | 28 +++++++++++++++++++++++++- 1 file changed, 27 insertions(+), 1 deletion(-) diff --git a/tests/Constraints/OfPropertiesTest.php b/tests/Constraints/OfPropertiesTest.php index 17623f49..d3233308 100644 --- a/tests/Constraints/OfPropertiesTest.php +++ b/tests/Constraints/OfPropertiesTest.php @@ -213,7 +213,33 @@ public function getInvalidTests() } } }' - ) + ), + array( + '{"prop1": ["a", "b"]}', + '{ + "type": "object", + "properties": { + "prop1": { + "anyOf": [ + { + "type": "array", + "items": { + "type": "string", + "enum": ["b","c"] + } + }, + { + "type": "array", + "items": { + "type": "string", + "enum": ["c","d"] + } + } + ] + } + } + }' + ), ); }