function EntityBundleExistsConstraintValidatorTest::setUp

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

Overrides KernelTestBase::setUp

File

core/tests/Drupal/KernelTests/Core/Entity/EntityBundleExistsConstraintValidatorTest.php, line 30

Class

EntityBundleExistsConstraintValidatorTest
@group Entity @group Validation

Namespace

Drupal\KernelTests\Core\Entity

Code

protected function setUp() : void {
    parent::setUp();
    EntityTestBundle::create([
        'id' => 'foo',
        'label' => 'Test',
    ])->save();
}

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