You are here

public function EntityManagerTest::testClearCachedDefinitions in Zircon Profile 8

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

Tests the clearCachedDefinitions() method.

@covers ::clearCachedDefinitions

File

core/tests/Drupal/Tests/Core/Entity/EntityManagerTest.php, line 86
Contains \Drupal\Tests\Core\Entity\EntityManagerTest.

Class

EntityManagerTest
@coversDefaultClass \Drupal\Core\Entity\EntityManager @group Entity

Namespace

Drupal\Tests\Core\Entity

Code

public function testClearCachedDefinitions() {
  $this->entityTypeManager
    ->clearCachedDefinitions()
    ->shouldBeCalled();
  $this->entityTypeRepository
    ->clearCachedDefinitions()
    ->shouldBeCalled();
  $this->entityTypeBundleInfo
    ->clearCachedBundles()
    ->shouldBeCalled();
  $this->entityFieldManager
    ->clearCachedFieldDefinitions()
    ->shouldBeCalled();
  $this->entityManager
    ->clearCachedDefinitions();
}