function ConfigTestValidationTest::setUpEnvironment

Same name and namespace in other branches
  1. 11.x core/modules/config/tests/config_test/tests/src/Kernel/ConfigTestValidationTest.php \Drupal\Tests\config_test\Kernel\ConfigTestValidationTest::setUpEnvironment()

File

core/modules/config/tests/config_test/tests/src/Kernel/ConfigTestValidationTest.php, line 28

Class

ConfigTestValidationTest
Tests validation of config_test entities.

Namespace

Drupal\Tests\config_test\Kernel

Code

protected function setUpEnvironment() : void {
  parent::setUpEnvironment();
  $this->installConfig('config_test');
  $this->entity = \Drupal::entityTypeManager()->getStorage('config_test')
    ->create([
    'id' => 'test',
    'label' => 'test',
  ]);
  $this->entity
    ->save();
}

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