Skip to content

Commit 6014c7c

Browse files
committed
LYNX-100: Fix static tests
1 parent dd00afd commit 6014c7c

File tree

3 files changed

+8
-8
lines changed

3 files changed

+8
-8
lines changed

app/code/Magento/EavGraphQl/Model/Resolver/AttributesList.php

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -78,15 +78,15 @@ public function resolve(
7878
array $value = null,
7979
array $args = null
8080
): array {
81-
if (!$args['entity_type']) {
82-
throw new GraphQlInputException(__('Required parameter "%1" of type string.', 'entity_type'));
81+
if (!$args['entityType']) {
82+
throw new GraphQlInputException(__('Required parameter "%1" of type string.', 'entityType'));
8383
}
8484

8585
$errors = [];
8686
$storeId = (int) $context->getExtensionAttributes()->getStore()->getId();
8787
$entityType = $this->enumLookup->getEnumValueFromField(
8888
'AttributeEntityTypeEnum',
89-
mb_strtolower($args['entity_type'])
89+
mb_strtolower($args['entityType'])
9090
);
9191

9292
$searchCriteria = $this->searchCriteriaBuilder;

app/code/Magento/EavGraphQl/etc/schema.graphqls

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ type Query {
55
customAttributeMetadata(attributes: [AttributeInput!]! @doc(description: "An input object that specifies the attribute code and entity type to search.")): CustomAttributeMetadata @resolver(class: "Magento\\EavGraphQl\\Model\\Resolver\\CustomAttributeMetadata") @doc(description: "Return the attribute type, given an attribute code and entity type.") @cache(cacheIdentity: "Magento\\EavGraphQl\\Model\\Resolver\\Cache\\CustomAttributeMetadataIdentity")
66
attributesMetadata(input: AttributesMetadataInput!): AttributesMetadataOutput! @resolver(class: "Magento\\EavGraphQl\\Model\\Resolver\\AttributesMetadata") @doc(description: "Retrieve EAV attributes metadata.")
77
attributesForm(type: String! @doc(description: "Form type")): AttributesFormOutput! @resolver(class: "Magento\\EavGraphQl\\Model\\Resolver\\AttributesForm") @doc(description: "Retrieve EAV attributes associated to a frontend form.")
8-
attributesList(entity_type: AttributeEntityTypeEnum! @doc(description: "Entity type.")): AttributesMetadataOutput @resolver(class: "Magento\\EavGraphQl\\Model\\Resolver\\AttributesList") @doc(description: "Returns list of atributes metadata for given entity type.") @cache(cacheable: false)
8+
attributesList(entityType: AttributeEntityTypeEnum! @doc(description: "Entity type.")): AttributesMetadataOutput @resolver(class: "Magento\\EavGraphQl\\Model\\Resolver\\AttributesList") @doc(description: "Returns list of atributes metadata for given entity type.") @cache(cacheable: false)
99
}
1010

1111
type CustomAttributeMetadata @doc(description: "Defines an array of custom attributes.") {

dev/tests/api-functional/testsuite/Magento/GraphQl/EavGraphQl/AttributesListTest.php

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
*/
66
declare(strict_types=1);
77

8-
namespace Magento\GraphQl\Customer\Attribute;
8+
namespace Magento\GraphQl\EavGraphQl;
99

1010
use Magento\Customer\Api\CustomerMetadataInterface;
1111
use Magento\Catalog\Setup\CategorySetup;
@@ -83,7 +83,7 @@ public function testAttributesList(): void
8383
{
8484
$queryResult = $this->graphQlQuery(<<<QRY
8585
{
86-
attributesList(entity_type: CUSTOMER) {
86+
attributesList(entityType: CUSTOMER) {
8787
items {
8888
uid
8989
code
@@ -132,7 +132,7 @@ public function testAttributesList(): void
132132

133133
$queryResult = $this->graphQlQuery(<<<QRY
134134
{
135-
attributesList(entity_type: CATALOG_PRODUCT) {
135+
attributesList(entityType: CATALOG_PRODUCT) {
136136
items {
137137
uid
138138
code
@@ -170,7 +170,7 @@ public function testAttributesList(): void
170170

171171
/**
172172
* Finds attribute in query result
173-
*
173+
*
174174
* @param array $items
175175
* @param string $attribute_code
176176
* @return array

0 commit comments

Comments
 (0)