diff --git a/core/config/schema/core.data_types.schema.yml b/core/config/schema/core.data_types.schema.yml index 8e98d7c2fdb..b3941643c5d 100644 --- a/core/config/schema/core.data_types.schema.yml +++ b/core/config/schema/core.data_types.schema.yml @@ -28,6 +28,9 @@ email: integer: label: 'Integer' class: '\Drupal\Core\TypedData\Plugin\DataType\IntegerData' +timestamp: + label: 'Timestamp' + class: '\Drupal\Core\TypedData\Plugin\DataType\Timestamp' float: label: 'Float' class: '\Drupal\Core\TypedData\Plugin\DataType\FloatData' diff --git a/core/modules/field/tests/modules/field_timestamp_test/config/install/field.field.entity_test.entity_test.timestamp.yml b/core/modules/field/tests/modules/field_timestamp_test/config/install/field.field.entity_test.entity_test.timestamp.yml new file mode 100644 index 00000000000..f646f775234 --- /dev/null +++ b/core/modules/field/tests/modules/field_timestamp_test/config/install/field.field.entity_test.entity_test.timestamp.yml @@ -0,0 +1,19 @@ +langcode: en +status: true +dependencies: + config: + - field.storage.entity_test.timestamp +id: entity_test.entity_test.timestamp +field_name: timestamp +entity_type: entity_test +bundle: entity_test +label: 'Time stamp' +description: '' +required: false +translatable: false +default_value: + - + value: 1514847537 +default_value_callback: '' +settings: { } +field_type: timestamp diff --git a/core/modules/field/tests/modules/field_timestamp_test/config/install/field.storage.entity_test.timestamp.yml b/core/modules/field/tests/modules/field_timestamp_test/config/install/field.storage.entity_test.timestamp.yml new file mode 100644 index 00000000000..6534f934d2c --- /dev/null +++ b/core/modules/field/tests/modules/field_timestamp_test/config/install/field.storage.entity_test.timestamp.yml @@ -0,0 +1,17 @@ +langcode: en +status: true +dependencies: + module: + - entity_test +id: node.timestamp +field_name: timestamp +entity_type: entity_test +type: timestamp +settings: { } +module: core +locked: false +cardinality: 1 +translatable: true +indexes: { } +persist_with_no_fields: false +custom_storage: false diff --git a/core/modules/field/tests/modules/field_timestamp_test/field_timestamp_test.info.yml b/core/modules/field/tests/modules/field_timestamp_test/field_timestamp_test.info.yml new file mode 100644 index 00000000000..dbabfc2c9d9 --- /dev/null +++ b/core/modules/field/tests/modules/field_timestamp_test/field_timestamp_test.info.yml @@ -0,0 +1,9 @@ +name: 'Field Timestamp Test' +type: module +description: 'Support module for the Timestamp field item test.' +core: 8.x +package: Testing +version: VERSION +dependencies: + - entity_test + - field diff --git a/core/tests/Drupal/KernelTests/Core/Datetime/TimestampSchemaTest.php b/core/tests/Drupal/KernelTests/Core/Datetime/TimestampSchemaTest.php new file mode 100644 index 00000000000..43fbd42f4cb --- /dev/null +++ b/core/tests/Drupal/KernelTests/Core/Datetime/TimestampSchemaTest.php @@ -0,0 +1,28 @@ +installConfig(['field_timestamp_test']); + // Make at least an assertion. + $this->assertTrue(TRUE); + } + +}