You are here

protected function ConfigFieldDefinitionTest::setUp in Drupal 8

Same name and namespace in other branches
  1. 9 core/modules/field/tests/src/Kernel/ConfigFieldDefinitionTest.php \Drupal\Tests\field\Kernel\ConfigFieldDefinitionTest::setUp()

Set the default field storage backend for fields created during tests.

Overrides FieldKernelTestBase::setUp

File

core/modules/field/tests/src/Kernel/ConfigFieldDefinitionTest.php, line 28

Class

ConfigFieldDefinitionTest
Tests exposing field definitions for configurable fields.

Namespace

Drupal\Tests\field\Kernel

Code

protected function setUp() {
  parent::setUp();

  // Create a field and a storage of type 'test_field', on the 'entity_test'
  // entity type.
  $this->entityType = 'entity_test';
  $this->bundle = 'entity_test';
  $this
    ->createFieldWithStorage('', $this->entityType, $this->bundle);

  // Create a second field on 'entity_test_rev'.
  $this
    ->installEntitySchema('entity_test_rev');
  $this
    ->createFieldWithStorage('_rev', 'entity_test_rev', 'entity_test_rev');
}