protected function ConfigFieldDefinitionTest::setUp in Zircon Profile 8.0
Same name and namespace in other branches
- 8 core/modules/field/src/Tests/ConfigFieldDefinitionTest.php \Drupal\field\Tests\ConfigFieldDefinitionTest::setUp()
Set the default field storage backend for fields created during tests.
Overrides FieldUnitTestBase::setUp
File
- core/
modules/ field/ src/ Tests/ ConfigFieldDefinitionTest.php, line 40 - Contains \Drupal\field\Tests\ConfigFieldDefinitionTest.
Class
- ConfigFieldDefinitionTest
- Tests exposing field definitions for configurable fields.
Namespace
Drupal\field\TestsCode
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);
$this->entityManager = $this->container
->get('entity.manager');
// Create a second field on 'entity_test_rev'.
$this
->createFieldWithStorage('_rev', 'entity_test_rev', 'entity_test_rev');
}