You are here

protected function DateRecurPartGridTest::setUp in Recurring Dates Field 3.x

Same name and namespace in other branches
  1. 8.2 tests/src/Kernel/DateRecurPartGridTest.php \Drupal\Tests\date_recur\Kernel\DateRecurPartGridTest::setUp()
  2. 3.0.x tests/src/Kernel/DateRecurPartGridTest.php \Drupal\Tests\date_recur\Kernel\DateRecurPartGridTest::setUp()
  3. 3.1.x tests/src/Kernel/DateRecurPartGridTest.php \Drupal\Tests\date_recur\Kernel\DateRecurPartGridTest::setUp()

Overrides KernelTestBase::setUp

File

tests/src/Kernel/DateRecurPartGridTest.php, line 40

Class

DateRecurPartGridTest
Tests field validation failures as a result part grids.

Namespace

Drupal\Tests\date_recur\Kernel

Code

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',
  ];
  $this->fieldConfig = FieldConfig::create($field);
}