protected function DateRecurFieldTest::setUp in Recurring Dates Field 3.1.x
Same name and namespace in other branches
- 8.2 tests/src/Kernel/DateRecurFieldTest.php \Drupal\Tests\date_recur\Kernel\DateRecurFieldTest::setUp()
- 3.x tests/src/Kernel/DateRecurFieldTest.php \Drupal\Tests\date_recur\Kernel\DateRecurFieldTest::setUp()
- 3.0.x tests/src/Kernel/DateRecurFieldTest.php \Drupal\Tests\date_recur\Kernel\DateRecurFieldTest::setUp()
Overrides KernelTestBase::setUp
File
- tests/
src/ Kernel/ DateRecurFieldTest.php, line 35
Class
- DateRecurFieldTest
- Tests date_recur fields.
Namespace
Drupal\Tests\date_recur\KernelCode
protected function setUp() : void {
parent::setUp();
$this
->installEntitySchema('entity_test');
$field_storage = FieldStorageConfig::create([
'entity_type' => 'entity_test',
'field_name' => 'foo',
'type' => 'date_recur',
'settings' => [
'datetime_type' => DateRecurItem::DATETIME_TYPE_DATETIME,
],
]);
$field_storage
->save();
$field = [
'field_name' => 'foo',
'entity_type' => 'entity_test',
'bundle' => 'entity_test',
];
FieldConfig::create($field)
->save();
}