protected function ScheduledChangeItemTest::setUp in Commerce Recurring Framework 8
Overrides RecurringKernelTestBase::setUp
File
- tests/
src/ Kernel/ ScheduledChangeItemTest.php, line 27
Class
- ScheduledChangeItemTest
- Tests the scheduled change field.
Namespace
Drupal\Tests\commerce_recurring\KernelCode
protected function setUp() : void {
parent::setUp();
$field_storage = FieldStorageConfig::create([
'field_name' => 'test_scheduled_changes',
'entity_type' => 'entity_test',
'type' => 'commerce_scheduled_change',
'cardinality' => FieldStorageConfig::CARDINALITY_UNLIMITED,
]);
$field_storage
->save();
$field = FieldConfig::create([
'field_name' => 'test_scheduled_changes',
'entity_type' => 'entity_test',
'bundle' => 'entity_test',
]);
$field
->save();
$entity = EntityTest::create([
'name' => 'Test',
]);
$entity
->save();
$this->testEntity = $entity;
}