function MapBaseFieldTest::setUp

Same name in other branches
  1. 9 core/tests/Drupal/KernelTests/Core/Field/MapBaseFieldTest.php \Drupal\KernelTests\Core\Field\MapBaseFieldTest::setUp()
  2. 8.9.x core/tests/Drupal/KernelTests/Core/Field/MapBaseFieldTest.php \Drupal\KernelTests\Core\Field\MapBaseFieldTest::setUp()
  3. 10 core/tests/Drupal/KernelTests/Core/Field/MapBaseFieldTest.php \Drupal\KernelTests\Core\Field\MapBaseFieldTest::setUp()

Overrides EntityKernelTestBase::setUp

File

core/tests/Drupal/KernelTests/Core/Field/MapBaseFieldTest.php, line 33

Class

MapBaseFieldTest
Tests map base fields.

Namespace

Drupal\KernelTests\Core\Field

Code

protected function setUp() : void {
    parent::setUp();
    $this->entityDefinitionUpdateManager = $this->container
        ->get('entity.definition_update_manager');
    // Install every entity type's schema that wasn't installed in the parent
    // method.
    foreach (array_diff_key($this->entityTypeManager
        ->getDefinitions(), array_flip([
        'user',
        'entity_test',
    ])) as $entity_type_id => $entity_type) {
        $this->installEntitySchema($entity_type_id);
    }
}

Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.