diff --git a/core/modules/file/src/Plugin/migrate/process/d6/CckFile.php b/core/modules/file/src/Plugin/migrate/process/d6/CckFile.php index fd2f42c..748eff0 100644 --- a/core/modules/file/src/Plugin/migrate/process/d6/CckFile.php +++ b/core/modules/file/src/Plugin/migrate/process/d6/CckFile.php @@ -50,10 +50,10 @@ public function __construct(array $configuration, $plugin_id, $plugin_definition */ public static function create(ContainerInterface $container, array $configuration, $plugin_id, $plugin_definition, MigrationInterface $migration = NULL) { // Configure the migration process plugin to look up migrated IDs from - // the d6_file migration. - $migration_plugin_configuration = [ - 'source' => ['fid'], + // a d6 file migration. + $migration_plugin_configuration = $configuration + [ 'migration' => 'd6_file', + 'source' => ['fid'], ]; return new static( @@ -100,5 +100,4 @@ public function transform($value, MigrateExecutableInterface $migrate_executable return []; } } - } diff --git a/core/modules/file/tests/src/Kernel/Migrate/process/d6/CckFileTest.php b/core/modules/file/tests/src/Kernel/Migrate/process/d6/CckFileTest.php new file mode 100644 index 0000000..1c60c95 --- /dev/null +++ b/core/modules/file/tests/src/Kernel/Migrate/process/d6/CckFileTest.php @@ -0,0 +1,32 @@ +container, [], 'custom_migration', []); + $cck_file_migration = CckFile::create($this->container, ['migration' => 'custom_file'], 'custom_file', [], $migration); + $migration_plugin = $this->readAttribute($cck_file_migration, 'migrationPlugin'); + $config = $this->readAttribute($migration_plugin, 'configuration'); + + $this->assertEquals($config['migration'], 'custom_file'); + } + +}