protected function ConfigEntityAdapterTest::setUp in Drupal 9
Same name and namespace in other branches
- 8 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\EntityCode
protected function setUp() : void {
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,
]);
}