function ConfigEntityStaticCacheTest::setUp

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

Overrides KernelTestBase::setUp

File

core/tests/Drupal/KernelTests/Core/Config/ConfigEntityStaticCacheTest.php, line 39

Class

ConfigEntityStaticCacheTest
Tests the entity static cache when used by config entities.

Namespace

Drupal\KernelTests\Core\Config

Code

protected function setUp() {
    parent::setUp();
    $this->entityTypeId = 'config_test';
    $this->entityId = 'test_1';
    $this->container
        ->get('entity_type.manager')
        ->getStorage($this->entityTypeId)
        ->create([
        'id' => $this->entityId,
        'label' => 'Original label',
    ])
        ->save();
}

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