File tree Expand file tree Collapse file tree 2 files changed +6
-5
lines changed
dev/tests/integration/testsuite/Magento/Framework/GraphQl/Config
lib/internal/Magento/Framework/GraphQl/Schema/Type/Enum Expand file tree Collapse file tree 2 files changed +6
-5
lines changed Original file line number Diff line number Diff line change @@ -194,11 +194,7 @@ enumValues(includeDeprecated: true) {
194
194
$ response = $ this ->graphQlController ->dispatch ($ request );
195
195
$ output = $ this ->jsonSerializer ->unserialize ($ response ->getContent ());
196
196
$ expectedOutput = require __DIR__ . '/../_files/schema_response_sdl_description.php ' ;
197
-
198
197
$ schemaResponseFields = $ output ['data ' ]['__schema ' ]['types ' ];
199
- $ schemaResponseFieldsFirstHalf = array_slice ($ schemaResponseFields , 0 , 25 );
200
- $ schemaResponseFieldsSecondHalf = array_slice ($ schemaResponseFields , -21 , 21 );
201
- $ mergedSchemaResponseFields = array_merge ($ schemaResponseFieldsFirstHalf , $ schemaResponseFieldsSecondHalf );
202
198
203
199
foreach ($ expectedOutput as $ searchTerm ) {
204
200
$ sortFields = ['inputFields ' , 'fields ' ];
@@ -215,7 +211,7 @@ function ($a, $b) {
215
211
}
216
212
217
213
$ this ->assertTrue (
218
- (in_array ($ searchTerm , $ mergedSchemaResponseFields )),
214
+ (in_array ($ searchTerm , $ schemaResponseFields )),
219
215
'Missing type in the response '
220
216
);
221
217
}
Original file line number Diff line number Diff line change @@ -24,6 +24,11 @@ public function __construct(EnumElement $configElement)
24
24
'name ' => $ configElement ->getName (),
25
25
'description ' => $ configElement ->getDescription ()
26
26
];
27
+
28
+ if (empty ($ configElement ->getValues ())) {
29
+ $ config ['values ' ] = [];
30
+ }
31
+
27
32
foreach ($ configElement ->getValues () as $ value ) {
28
33
$ config ['values ' ][$ value ->getValue ()] = [
29
34
'value ' => $ value ->getValue (),
You can’t perform that action at this time.
0 commit comments