3 namespace Drupal\Tests\file\Kernel\Migrate\process\d6;
5 use Drupal\file\Plugin\migrate\process\d6\CckFile;
6 use Drupal\migrate\Plugin\Migration;
7 use Drupal\Tests\migrate_drupal\Kernel\MigrateDrupalTestBase;
10 * Cck file field migration.
12 * @coversDefaultClass \Drupal\file\Plugin\migrate\process\d6\CckFile
16 class CckFileTest extends MigrateDrupalTestBase {
19 * Tests configurability of file migration name.
21 * @covers ::__construct
23 public function testConfigurableFileMigration() {
24 $migration = Migration::create($this->container, [], 'custom_migration', []);
25 $cck_file_migration = CckFile::create($this->container, ['migration' => 'custom_file'], 'custom_file', [], $migration);
26 $migration_plugin = $this->readAttribute($cck_file_migration, 'migrationPlugin');
27 $config = $this->readAttribute($migration_plugin, 'configuration');
29 $this->assertEquals($config['migration'], 'custom_file');