Skip to content

Commit 8d5443e

Browse files
committed
add unit tests for draft 3 'required' objects
1 parent f215683 commit 8d5443e

File tree

1 file changed

+21
-0
lines changed

1 file changed

+21
-0
lines changed

tests/JsonSchema/Tests/Constraints/RequiredPropertyTest.php

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -68,6 +68,16 @@ public function getInvalidTests()
6868
'{
6969
"required": ["foo"]
7070
}'
71+
),
72+
array(
73+
'{
74+
}',
75+
'{
76+
"type": "object",
77+
"properties": {
78+
"foo": { "required": true }
79+
}
80+
}'
7181
)
7282
);
7383
}
@@ -179,6 +189,17 @@ public function getValidTests()
179189
},
180190
"required": ["foo"]
181191
}'
192+
),
193+
array(
194+
'{
195+
"foo": {}
196+
}',
197+
'{
198+
"type": "object",
199+
"properties": {
200+
"foo": { "required": true }
201+
}
202+
}'
182203
)
183204
);
184205
}

0 commit comments

Comments
 (0)