protected function DateRecurOccurrenceTableAttachedTest::setUp in Recurring Dates Field 3.1.x
Same name and namespace in other branches
- 8.2 tests/src/Kernel/DateRecurOccurrenceTableAttachedTest.php \Drupal\Tests\date_recur\Kernel\DateRecurOccurrenceTableAttachedTest::setUp()
- 3.x tests/src/Kernel/DateRecurOccurrenceTableAttachedTest.php \Drupal\Tests\date_recur\Kernel\DateRecurOccurrenceTableAttachedTest::setUp()
- 3.0.x tests/src/Kernel/DateRecurOccurrenceTableAttachedTest.php \Drupal\Tests\date_recur\Kernel\DateRecurOccurrenceTableAttachedTest::setUp()
Overrides DateRecurOccurrenceTableTest::setUp
File
- tests/
src/ Kernel/ DateRecurOccurrenceTableAttachedTest.php, line 22
Class
- DateRecurOccurrenceTableAttachedTest
- Tests occurrence tables values.
Namespace
Drupal\Tests\date_recur\KernelCode
protected function setUp() : void {
parent::setUp();
$this->testEntityType = 'entity_test_rev';
$this
->installEntitySchema($this->testEntityType);
$fieldStorage = FieldStorageConfig::create([
'entity_type' => $this->testEntityType,
'field_name' => 'abc',
'type' => 'date_recur',
'settings' => [
'datetime_type' => DateRecurItem::DATETIME_TYPE_DATETIME,
],
]);
$fieldStorage
->save();
$this->fieldDefinition = $fieldStorage;
$this->fieldName = 'abc';
$fieldConfig = FieldConfig::create([
'field_name' => 'abc',
'entity_type' => $this->testEntityType,
'bundle' => $this->testEntityType,
'settings' => [],
]);
$fieldConfig
->save();
}