You are here

protected function MediaMigrationTestBase::setEmbedMediaReferenceMethod in Media Migration 8

Sets the method of the embed media reference.

Parameters

string $new_reference_method: The reference method to set. This can be 'id', or 'uuid'.

1 call to MediaMigrationTestBase::setEmbedMediaReferenceMethod()
MediaMigrationTest::testMediaMigration in tests/src/Kernel/Migrate/MediaMigrationTest.php
Tests the migration of media entities.

File

tests/src/Kernel/Migrate/MediaMigrationTestBase.php, line 78

Class

MediaMigrationTestBase
Base class for Media Migration kernel tests.

Namespace

Drupal\Tests\media_migration\Kernel\Migrate

Code

protected function setEmbedMediaReferenceMethod($new_reference_method) {
  $current_method = Settings::get(MediaMigration::MEDIA_REFERENCE_METHOD_SETTINGS);
  if ($current_method !== $new_reference_method) {
    $this
      ->setSetting(MediaMigration::MEDIA_REFERENCE_METHOD_SETTINGS, $new_reference_method);
  }
}