protected function DateRecurFieldItemListTest::setUp in Recurring Dates Field 8.2
Same name and namespace in other branches
- 3.x tests/src/Kernel/DateRecurFieldItemListTest.php \Drupal\Tests\date_recur\Kernel\DateRecurFieldItemListTest::setUp()
- 3.0.x tests/src/Kernel/DateRecurFieldItemListTest.php \Drupal\Tests\date_recur\Kernel\DateRecurFieldItemListTest::setUp()
- 3.1.x tests/src/Kernel/DateRecurFieldItemListTest.php \Drupal\Tests\date_recur\Kernel\DateRecurFieldItemListTest::setUp()
Overrides KernelTestBase::setUp
File
- tests/
src/ Kernel/ DateRecurFieldItemListTest.php, line 51
Class
- DateRecurFieldItemListTest
- Tests date_recur field lists.
Namespace
Drupal\Tests\date_recur\KernelCode
protected function setUp() {
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();
// @todo convert to base field, attach field not required to test.
$this->entity = EntityTest::create();
}