function EntityBundleListCacheTest::setUp

Same name in other branches
  1. 9 core/tests/Drupal/FunctionalTests/Entity/EntityBundleListCacheTest.php \Drupal\FunctionalTests\Entity\EntityBundleListCacheTest::setUp()
  2. 8.9.x core/tests/Drupal/FunctionalTests/Entity/EntityBundleListCacheTest.php \Drupal\FunctionalTests\Entity\EntityBundleListCacheTest::setUp()
  3. 10 core/tests/Drupal/FunctionalTests/Entity/EntityBundleListCacheTest.php \Drupal\FunctionalTests\Entity\EntityBundleListCacheTest::setUp()

Overrides BrowserTestBase::setUp

File

core/tests/Drupal/FunctionalTests/Entity/EntityBundleListCacheTest.php, line 35

Class

EntityBundleListCacheTest
Tests that bundle tags are invalidated when entities change.

Namespace

Drupal\FunctionalTests\Entity

Code

protected function setUp() : void {
    parent::setUp();
    EntityTestBundle::create([
        'id' => 'bundle_a',
        'label' => 'Bundle A',
    ])->save();
    EntityTestBundle::create([
        'id' => 'bundle_b',
        'label' => 'Bundle B',
    ])->save();
}

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