You are here

protected function MigrateMediaTestBase::setClassicNodeMigration in Media Migration 8

Sets the type of the node migration.

Parameters

bool $classic_node_migration: Whether nodes should be migrated with the 'classic' way. If this is FALSE, and the current Drupal instance has the 'complete' migration, then the complete node migration will be used.

2 calls to MigrateMediaTestBase::setClassicNodeMigration()
MigrateMediaFromNonMediaSourceTest::testPlainFileToMediaMigration in tests/src/Functional/MigrateMediaFromNonMediaSourceTest.php
Tests the result of the media migration.
MigrateMediaTest::testMediaMigrate in tests/src/Functional/MigrateMediaTest.php
Tests the result of the media migration.

File

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

Class

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

Namespace

Drupal\Tests\media_migration\Functional

Code

protected function setClassicNodeMigration(bool $classic_node_migration) {
  $current_method = Settings::get('migrate_node_migrate_type_classic', FALSE);
  if ($current_method !== $classic_node_migration) {
    $settings['settings']['migrate_node_migrate_type_classic'] = (object) [
      'value' => $classic_node_migration,
      'required' => TRUE,
    ];
    $this
      ->writeSettings($settings);
  }
}