You are here

protected function MigrateMediaTestBase::setEmbedTokenDestinationFilterPlugin in Media Migration 8

Changes the entity embed token transform destination filter plugin.

Parameters

string|null $new_filter_plugin_id: The new token transform destination plugin ID.

2 calls to MigrateMediaTestBase::setEmbedTokenDestinationFilterPlugin()
MigrateEmbedMediaTokenToEntityEmbedTest::testMediaTokenToEntityEmbedTransform in tests/src/Functional/MigrateEmbedMediaTokenToEntityEmbedTest.php
Tests the result of Media Migration's embed media token transform.
MigrateMediaTestBase::setUp in tests/src/Functional/MigrateMediaTestBase.php

File

tests/src/Functional/MigrateMediaTestBase.php, line 634

Class

MigrateMediaTestBase
Provides a base class for testing media migration via the UI.

Namespace

Drupal\Tests\media_migration\Functional

Code

protected function setEmbedTokenDestinationFilterPlugin($new_filter_plugin_id) {
  $current_filter_plugin_id = Settings::get('media_migration_embed_token_transform_destination_filter_plugin');
  if ($new_filter_plugin_id !== $current_filter_plugin_id) {
    $settings['settings']['media_migration_embed_token_transform_destination_filter_plugin'] = (object) [
      'value' => $new_filter_plugin_id,
      'required' => TRUE,
    ];
    $this
      ->writeSettings($settings);
  }
}