You are here

protected function ConfigEntityAdapterTest::setUp in Drupal 8

Same name and namespace in other branches
  1. 9 core/tests/Drupal/KernelTests/Core/Entity/ConfigEntityAdapterTest.php \Drupal\KernelTests\Core\Entity\ConfigEntityAdapterTest::setUp()

Overrides KernelTestBase::setUp

File

core/tests/Drupal/KernelTests/Core/Entity/ConfigEntityAdapterTest.php, line 38

Class

ConfigEntityAdapterTest
Tests entity adapter for configuration entities.

Namespace

Drupal\KernelTests\Core\Entity

Code

protected function setUp() {
  parent::setUp();
  $this
    ->installConfig(static::$modules);

  // ConfigTest::create doesn't work with the following exception:
  // "Multiple entity types found for Drupal\config_test\Entity\ConfigTest."
  $this->entity = \Drupal::entityTypeManager()
    ->getStorage('config_test')
    ->create([
    'id' => 'system',
    'label' => 'foobar',
    'weight' => 1,
  ]);
}