File tree Expand file tree Collapse file tree 1 file changed +10
-0
lines changed
dev/tests/integration/testsuite/Magento/Framework/GraphQl/Config Expand file tree Collapse file tree 1 file changed +10
-0
lines changed Original file line number Diff line number Diff line change @@ -191,6 +191,16 @@ enumValues(includeDeprecated: true) {
191
191
$ mergedSchemaResponseFields = array_merge ($ schemaResponseFieldsFirstHalf , $ schemaResponseFieldsSecondHalf );
192
192
193
193
foreach ($ expectedOutput as $ searchTerm ) {
194
+ $ sortFields = ['inputFields ' , 'fields ' ];
195
+ foreach ($ sortFields as $ sortField ) {
196
+ isset ($ searchTerm [$ sortField ]) && is_array ($ searchTerm [$ sortField ])
197
+ ? usort ($ searchTerm [$ sortField ], function ($ a , $ b ) {
198
+ $ cmpField = 'name ' ;
199
+ return isset ($ a [$ cmpField ]) && isset ($ b [$ cmpField ])
200
+ ? strcmp ($ a [$ cmpField ], $ b [$ cmpField ]) : 0 ;
201
+ }) : null ;
202
+ }
203
+
194
204
$ this ->assertTrue (
195
205
(in_array ($ searchTerm , $ mergedSchemaResponseFields )),
196
206
'Missing type in the response '
You can’t perform that action at this time.
0 commit comments