protected function UpdateApiEntityDefinitionUpdateTest::reloadEntity in Zircon Profile 8
Same name and namespace in other branches
- 8.0 core/modules/system/src/Tests/Entity/Update/UpdateApiEntityDefinitionUpdateTest.php \Drupal\system\Tests\Entity\Update\UpdateApiEntityDefinitionUpdateTest::reloadEntity()
Reloads the specified entity.
Parameters
\Drupal\entity_test\Entity\EntityTest $entity: An entity object.
Return value
\Drupal\entity_test\Entity\EntityTest The reloaded entity object.
2 calls to UpdateApiEntityDefinitionUpdateTest::reloadEntity()
- UpdateApiEntityDefinitionUpdateTest::testMultipleUpdates in core/
modules/ system/ src/ Tests/ Entity/ Update/ UpdateApiEntityDefinitionUpdateTest.php - Tests that multiple updates applied in bulk work as expected.
- UpdateApiEntityDefinitionUpdateTest::testSingleUpdates in core/
modules/ system/ src/ Tests/ Entity/ Update/ UpdateApiEntityDefinitionUpdateTest.php - Tests that individual updates applied sequentially work as expected.
File
- core/
modules/ system/ src/ Tests/ Entity/ Update/ UpdateApiEntityDefinitionUpdateTest.php, line 205 - Contains \Drupal\system\Tests\Entity\Update\UpdateApiEntityDefinitionUpdateTest.
Class
- UpdateApiEntityDefinitionUpdateTest
- Tests performing entity updates through the Update API.
Namespace
Drupal\system\Tests\Entity\UpdateCode
protected function reloadEntity(EntityTest $entity) {
$this->entityManager
->useCaches(FALSE);
$this->entityManager
->getStorage('entity_test')
->resetCache([
$entity
->id(),
]);
return EntityTest::load($entity
->id());
}