You are here

protected function DateRecurOccurrenceTableTest::setUp in Recurring Dates Field 3.0.x

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

Overrides KernelTestBase::setUp

1 call to DateRecurOccurrenceTableTest::setUp()
DateRecurOccurrenceTableAttachedTest::setUp in tests/src/Kernel/DateRecurOccurrenceTableAttachedTest.php
1 method overrides DateRecurOccurrenceTableTest::setUp()
DateRecurOccurrenceTableAttachedTest::setUp in tests/src/Kernel/DateRecurOccurrenceTableAttachedTest.php

File

tests/src/Kernel/DateRecurOccurrenceTableTest.php, line 57

Class

DateRecurOccurrenceTableTest
Tests occurrence tables values.

Namespace

Drupal\Tests\date_recur\Kernel

Code

protected function setUp() : void {
  parent::setUp();
  $this->testEntityType = 'dr_entity_test_rev';
  $this
    ->installEntitySchema($this->testEntityType);

  // This is the name of the base field.
  $this->fieldName = 'dr';

  /** @var \Drupal\Core\Entity\EntityFieldManagerInterface $efm */
  $efm = \Drupal::service('entity_field.manager');
  $definitions = $efm
    ->getFieldStorageDefinitions($this->testEntityType);
  $this->fieldDefinition = $definitions[$this->fieldName];
}