protected function EntityTranslationSyncImageTest::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 EntityTranslationSyncImageTest::saveEntity()
EntityTranslationSyncImageTest::testImageFieldSync in drupal/core/modules/translation_entity/lib/Drupal/translation_entity/Tests/EntityTranslationSyncImageTest.php
Tests image field field synchronization.

File

drupal/core/modules/translation_entity/lib/Drupal/translation_entity/Tests/EntityTranslationSyncImageTest.php, line 218
Contains \Drupal\entity\Tests\EntityTranslationSyncImageTest.

Class

EntityTranslationSyncImageTest
Tests the Entity Translation image field synchronization capability.

Namespace

Drupal\translation_entity\Tests

Code

protected function saveEntity(EntityInterface $entity) {
  $entity
    ->save();
  $entity = entity_test_mul_load($entity
    ->id(), TRUE);
  return $entity;
}