You are here

public function EntityTypeBundleInfoTest::testClearCachedBundles in Zircon Profile 8

Same name and namespace in other branches
  1. 8.0 core/tests/Drupal/Tests/Core/Entity/EntityTypeBundleInfoTest.php \Drupal\Tests\Core\Entity\EntityTypeBundleInfoTest::testClearCachedBundles()

Tests the clearCachedBundles() method.

@covers ::clearCachedBundles

File

core/tests/Drupal/Tests/Core/Entity/EntityTypeBundleInfoTest.php, line 155
Contains \Drupal\Tests\Core\Entity\EntityTypeBundleInfoTest.

Class

EntityTypeBundleInfoTest
@coversDefaultClass \Drupal\Core\Entity\EntityTypeBundleInfo @group Entity

Namespace

Drupal\Tests\Core\Entity

Code

public function testClearCachedBundles() {
  $this
    ->setUpEntityTypeDefinitions();
  $this->typedDataManager
    ->clearCachedDefinitions()
    ->shouldBeCalled();
  $this->cacheTagsInvalidator
    ->invalidateTags([
    'entity_bundles',
  ])
    ->shouldBeCalled();
  $this->entityTypeBundleInfo
    ->clearCachedBundles();
}