protected function ContentEntityAutosaveFormTestBase::reloadEntity in Autosave Form 8
Returns the test entity
Parameters
mixed $id: The ID of the entity to load.
Return value
\Drupal\Core\Entity\EntityInterface|null An entity object. NULL if no matching entity is found.
1 call to ContentEntityAutosaveFormTestBase::reloadEntity()
- ContentEntityAutosaveFormTestBase::finalizeTestSavingRestoredEntityForm in tests/
src/ FunctionalJavascript/ ContentEntity/ ContentEntityAutosaveFormTestBase.php - Tests correctly saved entity after autosave restore.
File
- tests/
src/ FunctionalJavascript/ ContentEntity/ ContentEntityAutosaveFormTestBase.php, line 666
Class
- ContentEntityAutosaveFormTestBase
- Base test class for testing autosave support for entity forms.
Namespace
Drupal\Tests\autosave_form\FunctionalJavascript\ContentEntityCode
protected function reloadEntity($id) {
$storage = \Drupal::entityTypeManager()
->getStorage($this->entityType);
$storage
->resetCache([
$id,
]);
return $storage
->load($id);
}