File tree Expand file tree Collapse file tree 5 files changed +52
-12
lines changed Expand file tree Collapse file tree 5 files changed +52
-12
lines changed Original file line number Diff line number Diff line change 99
1010namespace JsonSchema \Tests \Constraints ;
1111
12- use JsonSchema \Validator ;
13-
1412class AdditionalPropertiesTest extends BaseTestCase
1513{
1614 public function getInvalidTests ()
@@ -52,8 +50,7 @@ public function getInvalidTests()
5250 "prop":{"type":"string"}
5351 },
5452 "additionalProperties": false
55- } ' ,
56- Validator::CHECK_MODE_TYPE_CAST
53+ } '
5754 ),
5855 array (
5956 '{
@@ -79,8 +76,7 @@ public function getInvalidTests()
7976 "prop":{"type":"string"}
8077 },
8178 "additionalProperties": {"type":"string"}
82- } ' ,
83- Validator::CHECK_MODE_TYPE_CAST
79+ } '
8480 ),
8581 array (
8682 '{
@@ -132,8 +128,7 @@ public function getValidTests()
132128 "properties":{
133129 "prop":{"type":"string"}
134130 }
135- } ' ,
136- Validator::CHECK_MODE_TYPE_CAST
131+ } '
137132 ),
138133 array (
139134 '{
Original file line number Diff line number Diff line change 77 */
88namespace JsonSchema \Tests \Constraints ;
99
10- use JsonSchema \Validator ;
11-
1210/**
1311 * Class OfPropertiesTest
1412 */
@@ -71,7 +69,7 @@ public function getInvalidTests()
7169 },
7270 "required": ["prop1"]
7371 } ' ,
74- Validator:: CHECK_MODE_NORMAL ,
72+ null ,
7573 array (
7674 array (
7775 "property " => "prop2 " ,
Original file line number Diff line number Diff line change 99
1010namespace JsonSchema \Tests \Constraints ;
1111
12+ use JsonSchema \Constraints \Constraint ;
1213use JsonSchema \Constraints \UndefinedConstraint ;
1314
1415class RequiredPropertyTest extends BaseTestCase
@@ -229,7 +230,8 @@ public function getInvalidTests()
229230 "properties": {
230231 "array":{"type":"array", "required": true}
231232 }
232- } '
233+ } ' ,
234+ Constraint::CHECK_MODE_NORMAL
233235 ),
234236 array (
235237 '{
Original file line number Diff line number Diff line change 88 */
99
1010namespace JsonSchema \Tests \Drafts ;
11+ use JsonSchema \Constraints \Constraint ;
1112
1213/**
1314 * @package JsonSchema\Tests\Drafts
@@ -25,6 +26,28 @@ protected function getFilePaths()
2526 );
2627 }
2728
29+ public function getInvalidForAssocTests ()
30+ {
31+ $ tests = parent ::getInvalidForAssocTests ();
32+ unset(
33+ $ tests ['type.json / object type matches objects / an array is not an object ' ],
34+ $ tests ['type.json / array type matches arrays / an object is not an array ' ]
35+ );
36+
37+ return $ tests ;
38+ }
39+
40+ public function getValidForAssocTests ()
41+ {
42+ $ tests = parent ::getValidForAssocTests ();
43+ unset(
44+ $ tests ['type.json / object type matches objects / an array is not an object ' ],
45+ $ tests ['type.json / array type matches arrays / an object is not an array ' ]
46+ );
47+
48+ return $ tests ;
49+ }
50+
2851 /**
2952 * {@inheritdoc}
3053 */
Original file line number Diff line number Diff line change @@ -25,6 +25,28 @@ protected function getFilePaths()
2525 );
2626 }
2727
28+ public function getInvalidForAssocTests ()
29+ {
30+ $ tests = parent ::getInvalidForAssocTests ();
31+ unset(
32+ $ tests ['type.json / object type matches objects / an array is not an object ' ],
33+ $ tests ['type.json / array type matches arrays / an object is not an array ' ]
34+ );
35+
36+ return $ tests ;
37+ }
38+
39+ public function getValidForAssocTests ()
40+ {
41+ $ tests = parent ::getValidForAssocTests ();
42+ unset(
43+ $ tests ['type.json / object type matches objects / an array is not an object ' ],
44+ $ tests ['type.json / array type matches arrays / an object is not an array ' ]
45+ );
46+
47+ return $ tests ;
48+ }
49+
2850 /**
2951 * {@inheritdoc}
3052 */
You can’t perform that action at this time.
0 commit comments