protected function ContentTranslationSyncImageTest::saveEntity in Drupal 8
Same name and namespace in other branches
- 9 core/modules/content_translation/tests/src/Functional/ContentTranslationSyncImageTest.php \Drupal\Tests\content_translation\Functional\ContentTranslationSyncImageTest::saveEntity()
- 10 core/modules/content_translation/tests/src/Functional/ContentTranslationSyncImageTest.php \Drupal\Tests\content_translation\Functional\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 field synchronization.
File
- core/
modules/ content_translation/ tests/ src/ Functional/ ContentTranslationSyncImageTest.php, line 261
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;
}