CckFileTest.php in Drupal 8
File
core/modules/file/tests/src/Kernel/Migrate/process/d6/CckFileTest.php
View source
<?php
namespace Drupal\Tests\file\Kernel\Migrate\process\d6;
use Drupal\file\Plugin\migrate\process\d6\CckFile;
use Drupal\migrate\Plugin\Migration;
use Drupal\Tests\migrate_drupal\Kernel\MigrateDrupalTestBase;
class CckFileTest extends MigrateDrupalTestBase {
public function testConfigurableFileMigration() {
$migration = Migration::create($this->container, [], 'custom_migration', []);
$cck_file_migration = CckFile::create($this->container, [
'migration' => 'custom_file',
], 'custom_file', [], $migration);
$config = $this
->readAttribute($cck_file_migration, 'configuration');
$this
->assertEquals($config['migration'], 'custom_file');
}
}