protected function ConfigFieldDefinitionTest::setUp in Drupal 9
Same name and namespace in other branches
- 8 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\KernelCode
protected function setUp() : void {
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');
}