CustomerMetadataInterface::ATTRIBUTE_SET_ID_CUSTOMER, 'frontend_input' => 'multiline', 'default_value' => 'this is line one this is line two', 'input_filter' => 'STRIPTAGS', 'multiline_count' => 2, 'sort_order' => 3, 'validate_rules' => '{"MIN_TEXT_LENGTH":"100","MAX_TEXT_LENGTH":"200","INPUT_VALIDATION":"EMAIL"}', ], 'attribute' ) ] public function testMetadata(): void { /** @var AttributeMetadataInterface $attribute */ $attribute = DataFixtureStorageManager::getStorage()->get('attribute'); $formattedValidationRules = Bootstrap::getObjectManager()->get(FormatValidationRulesCommand::class)->execute( $attribute->getValidationRules() ); $result = $this->graphQlQuery(sprintf(self::QUERY, $attribute->getAttributeCode(), 'customer')); $this->assertEquals( [ 'customAttributeMetadataV2' => [ 'items' => [ [ 'code' => $attribute->getAttributeCode(), 'label' => $attribute->getFrontendLabel(), 'entity_type' => 'CUSTOMER', 'frontend_input' => 'MULTILINE', 'is_required' => false, 'default_value' => $attribute->getDefaultValue(), 'is_unique' => false, 'input_filter' => $attribute->getInputFilter(), 'multiline_count' => $attribute->getMultilineCount(), 'sort_order' => $attribute->getSortOrder(), 'validate_rules' => $formattedValidationRules ] ], 'errors' => [] ] ], $result ); } }