protected function FileUrlFieldItemListTest::reloadEntity in File URL 2.0.x
Same name and namespace in other branches
- 8 tests/src/Kernel/FileUrlFieldItemListTest.php \Drupal\Tests\file_url\Kernel\FileUrlFieldItemListTest::reloadEntity()
Reloads the given entity from the storage and returns it.
Parameters
\Drupal\Core\Entity\EntityInterface $entity: The entity to be reloaded.
Return value
\Drupal\Core\Entity\EntityInterface The reloaded entity.
1 call to FileUrlFieldItemListTest::reloadEntity()
- FileUrlFieldItemListTest::testReferencedEntities in tests/
src/ Kernel/ FileUrlFieldItemListTest.php - Tests the retrieval of referenced files.
File
- tests/
src/ Kernel/ FileUrlFieldItemListTest.php, line 152
Class
- FileUrlFieldItemListTest
- Tests the overridden field item list.
Namespace
Drupal\Tests\file_url\KernelCode
protected function reloadEntity(EntityInterface $entity) {
$controller = $this->entityTypeManager
->getStorage($entity
->getEntityTypeId());
$controller
->resetCache([
$entity
->id(),
]);
return $controller
->load($entity
->id());
}