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 9
9
10
10
namespace JsonSchema \Tests \Constraints ;
11
11
12
- use JsonSchema \Validator ;
13
-
14
12
class AdditionalPropertiesTest extends BaseTestCase
15
13
{
16
14
public function getInvalidTests ()
@@ -52,8 +50,7 @@ public function getInvalidTests()
52
50
"prop":{"type":"string"}
53
51
},
54
52
"additionalProperties": false
55
- } ' ,
56
- Validator::CHECK_MODE_TYPE_CAST
53
+ } '
57
54
),
58
55
array (
59
56
'{
@@ -79,8 +76,7 @@ public function getInvalidTests()
79
76
"prop":{"type":"string"}
80
77
},
81
78
"additionalProperties": {"type":"string"}
82
- } ' ,
83
- Validator::CHECK_MODE_TYPE_CAST
79
+ } '
84
80
),
85
81
array (
86
82
'{
@@ -132,8 +128,7 @@ public function getValidTests()
132
128
"properties":{
133
129
"prop":{"type":"string"}
134
130
}
135
- } ' ,
136
- Validator::CHECK_MODE_TYPE_CAST
131
+ } '
137
132
),
138
133
array (
139
134
'{
Original file line number Diff line number Diff line change 7
7
*/
8
8
namespace JsonSchema \Tests \Constraints ;
9
9
10
- use JsonSchema \Validator ;
11
-
12
10
/**
13
11
* Class OfPropertiesTest
14
12
*/
@@ -71,7 +69,7 @@ public function getInvalidTests()
71
69
},
72
70
"required": ["prop1"]
73
71
} ' ,
74
- Validator:: CHECK_MODE_NORMAL ,
72
+ null ,
75
73
array (
76
74
array (
77
75
"property " => "prop2 " ,
Original file line number Diff line number Diff line change 9
9
10
10
namespace JsonSchema \Tests \Constraints ;
11
11
12
+ use JsonSchema \Constraints \Constraint ;
12
13
use JsonSchema \Constraints \UndefinedConstraint ;
13
14
14
15
class RequiredPropertyTest extends BaseTestCase
@@ -229,7 +230,8 @@ public function getInvalidTests()
229
230
"properties": {
230
231
"array":{"type":"array", "required": true}
231
232
}
232
- } '
233
+ } ' ,
234
+ Constraint::CHECK_MODE_NORMAL
233
235
),
234
236
array (
235
237
'{
Original file line number Diff line number Diff line change 8
8
*/
9
9
10
10
namespace JsonSchema \Tests \Drafts ;
11
+ use JsonSchema \Constraints \Constraint ;
11
12
12
13
/**
13
14
* @package JsonSchema\Tests\Drafts
@@ -25,6 +26,28 @@ protected function getFilePaths()
25
26
);
26
27
}
27
28
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
+
28
51
/**
29
52
* {@inheritdoc}
30
53
*/
Original file line number Diff line number Diff line change @@ -25,6 +25,28 @@ protected function getFilePaths()
25
25
);
26
26
}
27
27
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
+
28
50
/**
29
51
* {@inheritdoc}
30
52
*/
You can’t perform that action at this time.
0 commit comments