protected function JsonApiFunctionalDateFieldTest::setUp in Drupal 10
File
- core/
modules/ jsonapi/ tests/ src/ Functional/ JsonApiFunctionalDateFieldTest.php, line 29
Class
- JsonApiFunctionalDateFieldTest
- JSON:API integration test for the "Date" field.
Namespace
Drupal\Tests\jsonapi\FunctionalCode
protected function setUp() : void {
parent::setUp();
FieldStorageConfig::create([
'field_name' => 'field_datetime',
'entity_type' => 'node',
'type' => 'datetime',
'settings' => [
'datetime_type' => 'datetime',
],
'cardinality' => 1,
])
->save();
FieldConfig::create([
'field_name' => 'field_datetime',
'label' => 'Date and time',
'entity_type' => 'node',
'bundle' => 'article',
'required' => FALSE,
'settings' => [],
'description' => '',
])
->save();
}