@@ -28,26 +28,34 @@ protected function getFilePaths(): array
2828 ];
2929 }
3030
31- public function getInvalidForAssocTests (): array
31+ public function getInvalidForAssocTests (): \ Generator
3232 {
33- $ tests = parent ::getInvalidForAssocTests ();
34- unset(
35- $ tests ['type.json / object type matches objects / an array is not an object ' ],
36- $ tests ['type.json / array type matches arrays / an object is not an array ' ]
37- );
33+ $ skip = [
34+ 'type.json / object type matches objects / an array is not an object ' ,
35+ 'type.json / array type matches arrays / an object is not an array ' ,
36+ ];
3837
39- return $ tests ;
38+ foreach (parent ::getInvalidForAssocTests () as $ name => $ testcase ) {
39+ if (in_array ($ name , $ skip , true )) {
40+ continue ;
41+ }
42+ yield $ name => $ testcase ;
43+ }
4044 }
4145
42- public function getValidForAssocTests (): array
46+ public function getValidForAssocTests (): \ Generator
4347 {
44- $ tests = parent ::getValidForAssocTests ();
45- unset(
46- $ tests ['type.json / object type matches objects / an array is not an object ' ],
47- $ tests ['type.json / array type matches arrays / an object is not an array ' ]
48- );
48+ $ skip = [
49+ 'type.json / object type matches objects / an array is not an object ' ,
50+ 'type.json / array type matches arrays / an object is not an array ' ,
51+ ];
4952
50- return $ tests ;
53+ foreach (parent ::getValidForAssocTests () as $ name => $ testcase ) {
54+ if (in_array ($ name , $ skip , true )) {
55+ continue ;
56+ }
57+ yield $ name => $ testcase ;
58+ }
5159 }
5260
5361 /**
0 commit comments