CustomerMetadataInterface::ATTRIBUTE_SET_ID_CUSTOMER, 'frontend_input' => 'boolean', 'source_model' => 'Magento\Eav\Model\Entity\Attribute\Source\Boolean' ], 'attribute' ), ] public function testMetadata(): void { /** @var AttributeMetadataInterface $attribute */ $attribute = DataFixtureStorageManager::getStorage()->get('attribute'); $result = $this->graphQlQuery(sprintf(self::QUERY, $attribute->getAttributeCode(), 'customer')); $this->assertEquals( [ 'customAttributeMetadataV2' => [ 'items' => [ [ 'code' => $attribute->getAttributeCode(), 'label' => $attribute->getFrontendLabel(), 'entity_type' => 'CUSTOMER', 'frontend_input' => 'BOOLEAN', 'is_required' => false, 'default_value' => $attribute->getDefaultValue(), 'is_unique' => false, 'options' => [ [ 'label' => 'Yes', 'value' => '1' ], [ 'label' => 'No', 'value' => '0' ] ] ] ], 'errors' => [] ] ], $result ); } }