You are here

protected function EntityBundleConditionTest::setUp in Drupal 9

Overrides EntityKernelTestBase::setUp

File

core/tests/Drupal/KernelTests/Core/Entity/EntityBundleConditionTest.php, line 18

Class

EntityBundleConditionTest
Tests that entity bundle conditions works properly.

Namespace

Drupal\KernelTests\Core\Entity

Code

protected function setUp() : void {
  parent::setUp();
  $this
    ->installEntitySchema('entity_test_with_bundle');

  // Create the entity bundles required for testing.
  $bundle = EntityTestBundle::create([
    'id' => 'page',
    'label' => 'page',
  ]);
  $bundle
    ->save();
  $bundle = EntityTestBundle::create([
    'id' => 'article',
    'label' => 'article',
  ]);
  $bundle
    ->save();
  $bundle = EntityTestBundle::create([
    'id' => 'test',
    'label' => 'test',
  ]);
  $bundle
    ->save();
}