You are here

protected function AcquiadamMediaTest::reSaveMedia in Media: Acquia DAM 8

Re-saves the media to get new updates.

2 calls to AcquiadamMediaTest::reSaveMedia()
AcquiadamMediaTest::saveNewVersion in tests/src/Kernel/AcquiadamMediaTest.php
Generates a new version of the asset and resaves media entity.
AcquiadamMediaTest::testFailedFileSave in tests/src/Kernel/AcquiadamMediaTest.php
Tests that version is only updated when file is saved correctly.

File

tests/src/Kernel/AcquiadamMediaTest.php, line 189

Class

AcquiadamMediaTest
Tests Media entities with Media: Acquia DAM source.

Namespace

Drupal\Tests\media_acquiadam\Kernel

Code

protected function reSaveMedia() {

  // Clear current asset so we get new updates from assets.
  $this
    ->clearCurrentAssetFromSource($this->media
    ->getSource());

  // Saves a new revision for this entity.
  $this->media
    ->setNewRevision(TRUE);
  $this->media
    ->save();
}