protected function TimestampItemTest::setUp in Drupal 10
Same name and namespace in other branches
- 8 core/modules/field/tests/src/Kernel/Timestamp/TimestampItemTest.php \Drupal\Tests\field\Kernel\Timestamp\TimestampItemTest::setUp()
- 9 core/modules/field/tests/src/Kernel/Timestamp/TimestampItemTest.php \Drupal\Tests\field\Kernel\Timestamp\TimestampItemTest::setUp()
File
- core/
modules/ field/ tests/ src/ Kernel/ Timestamp/ TimestampItemTest.php, line 36
Class
- TimestampItemTest
- Tests the timestamp fields.
Namespace
Drupal\Tests\field\Kernel\TimestampCode
protected function setUp() : void {
parent::setUp();
// Create a field with settings to validate.
$this->fieldStorage = FieldStorageConfig::create([
'field_name' => 'field_timestamp',
'type' => 'timestamp',
'entity_type' => 'entity_test',
]);
$this->fieldStorage
->save();
$this->field = FieldConfig::create([
'field_storage' => $this->fieldStorage,
'bundle' => 'entity_test',
]);
$this->field
->save();
}