Skip to content

Commit 9a37ca4

Browse files
flolivauderayd
authored andcommitted
Testcase for minProperties with properties defined (jsonrainbow#416)
+ Fix Test
1 parent f375f0b commit 9a37ca4

File tree

1 file changed

+20
-2
lines changed

1 file changed

+20
-2
lines changed

tests/Constraints/MinMaxPropertiesTest.php

Lines changed: 20 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -74,7 +74,7 @@ public function getInvalidTests()
7474
return array(
7575
array(
7676
'{
77-
"value": 1
77+
"value": {}
7878
}',
7979
'{
8080
"type": "object",
@@ -83,9 +83,27 @@ public function getInvalidTests()
8383
}
8484
}'
8585
),
86+
array(
87+
'{}',
88+
'{
89+
"type": "object",
90+
"properties": {
91+
"propertyOne": {
92+
"type": "string"
93+
},
94+
"propertyTwo": {
95+
"type": "string"
96+
}
97+
},
98+
"minProperties": 1
99+
}'
100+
),
86101
array(
87102
'{
88-
"value": 1
103+
"value": {
104+
"propertyOne": "valueOne",
105+
"propertyTwo": "valueTwo"
106+
}
89107
}',
90108
'{
91109
"type": "object",

0 commit comments

Comments
 (0)