public function EntityFieldManagerTest::testClearCachedFieldDefinitions in Drupal 9
Same name and namespace in other branches
- 8 core/tests/Drupal/Tests/Core/Entity/EntityFieldManagerTest.php \Drupal\Tests\Core\Entity\EntityFieldManagerTest::testClearCachedFieldDefinitions()
Tests the clearCachedFieldDefinitions() method.
@covers ::clearCachedFieldDefinitions
File
- core/
tests/ Drupal/ Tests/ Core/ Entity/ EntityFieldManagerTest.php, line 575 - Contains \Drupal\Tests\Core\Entity\EntityFieldManagerTest.
Class
- EntityFieldManagerTest
- @coversDefaultClass \Drupal\Core\Entity\EntityFieldManager @group Entity
Namespace
Drupal\Tests\Core\EntityCode
public function testClearCachedFieldDefinitions() {
$this
->setUpEntityTypeDefinitions();
$this->cacheTagsInvalidator
->invalidateTags([
'entity_field_info',
])
->shouldBeCalled();
$this->container
->get('cache_tags.invalidator')
->willReturn($this->cacheTagsInvalidator
->reveal())
->shouldBeCalled();
$this->typedDataManager
->clearCachedDefinitions()
->shouldBeCalled();
$this->entityFieldManager
->clearCachedFieldDefinitions();
}