Skip to content

Commit 970acdd

Browse files
committed
test: correct test regression due to newly introduced tests
1 parent 64ad0c7 commit 970acdd

File tree

2 files changed

+57
-0
lines changed

2 files changed

+57
-0
lines changed

tests/Drafts/Draft3Test.php

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,16 @@ protected function getFilePaths(): array
2828
];
2929
}
3030

31+
public function getInvalidTests(): array
32+
{
33+
$tests = parent::getInvalidTests();
34+
unset(
35+
$tests['ref.json / $ref prevents a sibling id from changing the base uri / $ref resolves to /definitions/base_foo, data does not validate']
36+
);
37+
38+
return $tests;
39+
}
40+
3141
public function getInvalidForAssocTests(): array
3242
{
3343
$tests = parent::getInvalidForAssocTests();
@@ -39,6 +49,17 @@ public function getInvalidForAssocTests(): array
3949
return $tests;
4050
}
4151

52+
public function getValidTests(): array
53+
{
54+
$tests = parent::getValidTests();
55+
unset(
56+
$tests['ref.json / $ref prevents a sibling id from changing the base uri / $ref resolves to /definitions/base_foo, data validates'],
57+
$tests['ref.json / naive replacement of $ref with its destination is not correct / match the enum exactly']
58+
);
59+
60+
return $tests;
61+
}
62+
4263
public function getValidForAssocTests(): array
4364
{
4465
$tests = parent::getValidForAssocTests();

tests/Drafts/Draft4Test.php

Lines changed: 36 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -28,17 +28,53 @@ protected function getFilePaths(): array
2828
];
2929
}
3030

31+
public function getInvalidTests(): array
32+
{
33+
$tests = parent::getInvalidTests();
34+
unset(
35+
$tests['id.json / id inside an enum is not a real identifier / no match on enum or $ref to id'],
36+
$tests['ref.json / $ref prevents a sibling id from changing the base uri / $ref resolves to /definitions/base_foo, data does not validate'],
37+
$tests['ref.json / Recursive references between schemas / invalid tree'],
38+
$tests['ref.json / refs with quote / object with strings is invalid'],
39+
$tests['ref.json / Location-independent identifier / mismatch'],
40+
$tests['ref.json / Location-independent identifier with base URI change in subschema / mismatch'],
41+
$tests['ref.json / empty tokens in $ref json-pointer / non-number is invalid'],
42+
$tests['ref.json / id must be resolved against nearest parent, not just immediate parent / non-number is invalid'],
43+
$tests['refRemote.json / Location-independent identifier in remote ref / string is invalid']
44+
);
45+
46+
return $tests;
47+
}
48+
3149
public function getInvalidForAssocTests(): array
3250
{
3351
$tests = parent::getInvalidForAssocTests();
3452
unset(
53+
$tests['ref.json / Recursive references between schemas / valid tree'],
3554
$tests['type.json / object type matches objects / an array is not an object'],
3655
$tests['type.json / array type matches arrays / an object is not an array']
3756
);
3857

3958
return $tests;
4059
}
4160

61+
public function getValidTests(): array
62+
{
63+
$tests = parent::getValidTests();
64+
unset(
65+
$tests['ref.json / $ref prevents a sibling id from changing the base uri / $ref resolves to /definitions/base_foo, data validates'],
66+
$tests['ref.json / Recursive references between schemas / valid tree'],
67+
$tests['ref.json / refs with quote / object with numbers is valid'],
68+
$tests['ref.json / Location-independent identifier / match'],
69+
$tests['ref.json / Location-independent identifier with base URI change in subschema / match'],
70+
$tests['ref.json / empty tokens in $ref json-pointer / number is valid'],
71+
$tests['ref.json / naive replacement of $ref with its destination is not correct / match the enum exactly'],
72+
$tests['refRemote.json / Location-independent identifier in remote ref / integer is valid']
73+
);
74+
75+
return $tests;
76+
}
77+
4278
public function getValidForAssocTests(): array
4379
{
4480
$tests = parent::getValidForAssocTests();

0 commit comments

Comments
 (0)