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) {
194194 $ response = $ this ->graphQlController ->dispatch ($ request );
195195 $ output = $ this ->jsonSerializer ->unserialize ($ response ->getContent ());
196196 $ expectedOutput = require __DIR__ . '/../_files/schema_response_sdl_description.php ' ;
197-
198197 $ 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 );
202198
203199 foreach ($ expectedOutput as $ searchTerm ) {
204200 $ sortFields = ['inputFields ' , 'fields ' ];
@@ -215,7 +211,7 @@ function ($a, $b) {
215211 }
216212
217213 $ this ->assertTrue (
218- (in_array ($ searchTerm , $ mergedSchemaResponseFields )),
214+ (in_array ($ searchTerm , $ schemaResponseFields )),
219215 'Missing type in the response '
220216 );
221217 }
Original file line number Diff line number Diff line change @@ -24,6 +24,11 @@ public function __construct(EnumElement $configElement)
2424 'name ' => $ configElement ->getName (),
2525 'description ' => $ configElement ->getDescription ()
2626 ];
27+
28+ if (empty ($ configElement ->getValues ())) {
29+ $ config ['values ' ] = [];
30+ }
31+
2732 foreach ($ configElement ->getValues () as $ value ) {
2833 $ config ['values ' ][$ value ->getValue ()] = [
2934 'value ' => $ value ->getValue (),
You can’t perform that action at this time.
0 commit comments