1c60c95d2199bd66e314957b65d366bcffd2ffcf
[yaffs-website] / web / core / modules / file / tests / src / Kernel / Migrate / process / d6 / CckFileTest.php
1 <?php
2
3 namespace Drupal\Tests\file\Kernel\Migrate\process\d6;
4
5 use Drupal\file\Plugin\migrate\process\d6\CckFile;
6 use Drupal\migrate\Plugin\Migration;
7 use Drupal\Tests\migrate_drupal\Kernel\MigrateDrupalTestBase;
8
9 /**
10  * Cck file field migration.
11  *
12  * @coversDefaultClass \Drupal\file\Plugin\migrate\process\d6\CckFile
13  *
14  * @group file
15  */
16 class CckFileTest extends MigrateDrupalTestBase {
17
18   /**
19    * Tests configurability of file migration name.
20    *
21    * @covers ::__construct
22    */
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');
28
29     $this->assertEquals($config['migration'], 'custom_file');
30   }
31
32 }