function 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/ tests/ src/ Functional/ Entity/ Update/ UpdateApiEntityDefinitionUpdateTest.php - Tests that multiple updates applied in bulk work as expected.
- UpdateApiEntityDefinitionUpdateTest::testSingleUpdates in core/
modules/ system/ tests/ src/ Functional/ Entity/ Update/ UpdateApiEntityDefinitionUpdateTest.php - Tests that individual updates applied sequentially work as expected.
File
-
core/
modules/ system/ tests/ src/ Functional/ Entity/ Update/ UpdateApiEntityDefinitionUpdateTest.php, line 173
Class
- UpdateApiEntityDefinitionUpdateTest
- Tests performing entity updates through the Update API.
Namespace
Drupal\Tests\system\Functional\Entity\UpdateCode
protected function reloadEntity(EntityTest $entity) {
\Drupal::entityTypeManager()->useCaches(FALSE);
\Drupal::service('entity_field.manager')->useCaches(FALSE);
return EntityTest::load($entity->id());
}
Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.