function EntityApiTest::setUp

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

Overrides EntityKernelTestBase::setUp

File

core/tests/Drupal/KernelTests/Core/Entity/EntityApiTest.php, line 22

Class

EntityApiTest
Tests basic CRUD functionality.

Namespace

Drupal\KernelTests\Core\Entity

Code

protected function setUp() : void {
    parent::setUp();
    foreach (entity_test_entity_types() as $entity_type_id) {
        // The entity_test schema is installed by the parent.
        if ($entity_type_id != 'entity_test') {
            $this->installEntitySchema($entity_type_id);
        }
    }
}

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