You are here

protected function PluginCollectionItemBaseTest::setUp in Plugin 8.2

Overrides KernelTestBase::setUp

File

tests/src/Kernel/Plugin/Field/FieldType/PluginCollectionItemBaseTest.php, line 32

Class

PluginCollectionItemBaseTest
@coversDefaultClass \Drupal\plugin\Plugin\Field\FieldType\PluginCollectionItemBase

Namespace

Drupal\Tests\plugin\Kernel\Plugin\Field\FieldType

Code

protected function setUp() : void {
  parent::setUp();
  $field_definition = BaseFieldDefinition::create('plugin:plugin_test_helper_mock');

  /** @var \Drupal\Core\Field\FieldItemListInterface $field_item_list */
  $field_item_list = \Drupal::typedDataManager()
    ->create($field_definition);
  $field_item_list
    ->appendItem();
  $this->sut = $field_item_list
    ->first();
}