AddressMetadataInterface::ATTRIBUTE_SET_ID_ADDRESS, 'frontend_input' => 'date', 'frontend_class' => 'hidden-for-virtual', 'default_value' => '2023-03-22 00:00:00', 'input_filter' => 'DATE', 'validate_rules' => '{"DATE_RANGE_MIN":"1679443200","DATE_RANGE_MAX":"1679875200","INPUT_VALIDATION":"DATE"}' ], '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_address') ); $this->assertEquals( [ 'customAttributeMetadataV2' => [ 'items' => [ [ 'code' => $attribute->getAttributeCode(), 'label' => $attribute->getFrontendLabel(), 'entity_type' => 'CUSTOMER_ADDRESS', 'frontend_input' => 'DATE', 'frontend_class' => 'hidden-for-virtual', 'is_required' => false, 'default_value' => $attribute->getDefaultValue(), 'is_unique' => false, 'input_filter' => $attribute->getInputFilter(), 'validate_rules' => $formattedValidationRules ] ], 'errors' => [] ] ], $result ); } }