@@ -20,9 +20,32 @@ protected function getFilePaths(): array
20
20
];
21
21
}
22
22
23
+ public function getInvalidTests (): \Generator
24
+ {
25
+ $ skip = [
26
+ 'id.json / id inside an enum is not a real identifier / no match on enum or $ref to id ' ,
27
+ 'ref.json / $ref prevents a sibling id from changing the base uri / $ref resolves to /definitions/base_foo, data does not validate ' ,
28
+ 'ref.json / Recursive references between schemas / invalid tree ' ,
29
+ 'ref.json / refs with quote / object with strings is invalid ' ,
30
+ 'ref.json / Location-independent identifier / mismatch ' ,
31
+ 'ref.json / Location-independent identifier with base URI change in subschema / mismatch ' ,
32
+ 'ref.json / empty tokens in $ref json-pointer / non-number is invalid ' ,
33
+ 'ref.json / id must be resolved against nearest parent, not just immediate parent / non-number is invalid ' ,
34
+ 'refRemote.json / Location-independent identifier in remote ref / string is invalid ' ,
35
+ ];
36
+
37
+ foreach (parent ::getInvalidTests () as $ name => $ testcase ) {
38
+ if (in_array ($ name , $ skip , true )) {
39
+ continue ;
40
+ }
41
+ yield $ name => $ testcase ;
42
+ }
43
+ }
44
+
23
45
public function getInvalidForAssocTests (): \Generator
24
46
{
25
47
$ skip = [
48
+ 'ref.json / Recursive references between schemas / valid tree ' ,
26
49
'type.json / object type matches objects / an array is not an object ' ,
27
50
'type.json / array type matches arrays / an object is not an array ' ,
28
51
];
@@ -35,6 +58,27 @@ public function getInvalidForAssocTests(): \Generator
35
58
}
36
59
}
37
60
61
+ public function getValidTests (): \Generator
62
+ {
63
+ $ skip = [
64
+ 'ref.json / $ref prevents a sibling id from changing the base uri / $ref resolves to /definitions/base_foo, data validates ' ,
65
+ 'ref.json / Recursive references between schemas / valid tree ' ,
66
+ 'ref.json / refs with quote / object with numbers is valid ' ,
67
+ 'ref.json / Location-independent identifier / match ' ,
68
+ 'ref.json / Location-independent identifier with base URI change in subschema / match ' ,
69
+ 'ref.json / empty tokens in $ref json-pointer / number is valid ' ,
70
+ 'ref.json / naive replacement of $ref with its destination is not correct / match the enum exactly ' ,
71
+ 'refRemote.json / Location-independent identifier in remote ref / integer is valid ' ,
72
+ ];
73
+
74
+ foreach (parent ::getValidTests () as $ name => $ testcase ) {
75
+ if (in_array ($ name , $ skip , true )) {
76
+ continue ;
77
+ }
78
+ yield $ name => $ testcase ;
79
+ }
80
+ }
81
+
38
82
public function getValidForAssocTests (): \Generator
39
83
{
40
84
$ skip = [
0 commit comments