function EntityFormModeValidationTest::setUp

Same name in other branches
  1. 11.x core/tests/Drupal/KernelTests/Core/Entity/EntityFormModeValidationTest.php \Drupal\KernelTests\Core\Entity\EntityFormModeValidationTest::setUp()

Overrides ConfigEntityValidationTestBase::setUp

File

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

Class

EntityFormModeValidationTest
Tests validation of entity_form_mode entities.

Namespace

Drupal\KernelTests\Core\Entity

Code

protected function setUp() : void {
    parent::setUp();
    $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.