function EntityTypeTest::testGetBundleListCacheTags

Tests the ::getBundleListCacheTags() method.

File

core/tests/Drupal/Tests/Core/Entity/EntityTypeTest.php, line 566

Class

EntityTypeTest
Tests Drupal\Core\Entity\EntityType.

Namespace

Drupal\Tests\Core\Entity

Code

public function testGetBundleListCacheTags() : void {
  $entity_type = $this->setUpEntityType([
    'entity_keys' => [
      'id' => 'id',
    ],
  ]);
  $bundle = $this->randomMachineName();
  $this->assertEquals([
    $entity_type->id() . '_list:' . $bundle,
  ], $entity_type->getBundleListCacheTags($bundle));
}

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