function EntityFormModeValidationTest::setUpEnvironment

Same name and namespace in other branches
  1. main core/tests/Drupal/KernelTests/Core/Entity/EntityFormModeValidationTest.php \Drupal\KernelTests\Core\Entity\EntityFormModeValidationTest::setUpEnvironment()

File

core/tests/Drupal/KernelTests/Core/Entity/EntityFormModeValidationTest.php, line 36

Class

EntityFormModeValidationTest
Tests validation of entity_form_mode entities.

Namespace

Drupal\KernelTests\Core\Entity

Code

protected function setUpEnvironment() : void {
  parent::setUpEnvironment();
  $this->installConfig('user');
  $this->entity = EntityFormMode::create([
    'id' => 'user.test',
    'label' => 'Test',
    'targetEntityType' => 'user',
  ]);
  $this->entity
    ->save();
}

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