private function ContextBlockTest::reload in Core Context 8
Reloads an entity from storage.
Parameters
\Drupal\Core\Entity\EntityInterface $entity: The entity to reload.
Return value
\Drupal\Core\Entity\EntityInterface The reloaded entity.
1 call to ContextBlockTest::reload()
- ContextBlockTest::doEntityTest in tests/
src/ Functional/ ContextBlockTest.php - Tests viewing context values attached to a fieldable entity.
File
- tests/
src/ Functional/ ContextBlockTest.php, line 68
Class
- ContextBlockTest
- @group core_context
Namespace
Drupal\Tests\core_context\FunctionalCode
private function reload(EntityInterface $entity) {
return $this->container
->get('entity_type.manager')
->getStorage($entity
->getEntityTypeId())
->load($entity
->id());
}