function ContentTranslationSyncImageTest::saveEntity
Saves the passed entity and reloads it, enabling compatibility mode.
Parameters
\Drupal\Core\Entity\EntityInterface $entity: The entity to be saved.
Return value
\Drupal\Core\Entity\EntityInterface The saved entity.
1 call to ContentTranslationSyncImageTest::saveEntity()
- ContentTranslationSyncImageTest::testImageFieldSync in core/modules/ content_translation/ tests/ src/ Functional/ ContentTranslationSyncImageTest.php 
- Tests image field synchronization.
File
- 
              core/modules/ content_translation/ tests/ src/ Functional/ ContentTranslationSyncImageTest.php, line 265 
Class
- ContentTranslationSyncImageTest
- Tests the field synchronization behavior for the image field.
Namespace
Drupal\Tests\content_translation\FunctionalCode
protected function saveEntity(EntityInterface $entity) {
  $entity->save();
  $entity = \Drupal::entityTypeManager()->getStorage('entity_test_mul')
    ->loadUnchanged($entity->id());
  return $entity;
}Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.
