From 72fc5cbaec9258c8928b40b5f64bccc369613376 Mon Sep 17 00:00:00 2001 From: Florent Olivaud Date: Fri, 24 Mar 2017 11:27:45 +0100 Subject: [PATCH] Testcase for minProperties with properties defined + Fix Test --- tests/Constraints/MinMaxPropertiesTest.php | 22 ++++++++++++++++++++-- 1 file changed, 20 insertions(+), 2 deletions(-) diff --git a/tests/Constraints/MinMaxPropertiesTest.php b/tests/Constraints/MinMaxPropertiesTest.php index e4fd5a1a..2063122c 100644 --- a/tests/Constraints/MinMaxPropertiesTest.php +++ b/tests/Constraints/MinMaxPropertiesTest.php @@ -74,7 +74,7 @@ public function getInvalidTests() return array( array( '{ - "value": 1 + "value": {} }', '{ "type": "object", @@ -83,9 +83,27 @@ public function getInvalidTests() } }' ), + array( + '{}', + '{ + "type": "object", + "properties": { + "propertyOne": { + "type": "string" + }, + "propertyTwo": { + "type": "string" + } + }, + "minProperties": 1 + }' + ), array( '{ - "value": 1 + "value": { + "propertyOne": "valueOne", + "propertyTwo": "valueTwo" + } }', '{ "type": "object",