'plugin' => 'config',
'config_name' => 'system.site',
],
];
/** @var \Drupal\migrate\Plugin\Migration $config_migration */
$config_migration = \Drupal::
service('plugin.manager.migration'
) ->
createStubMigration($definition);
$config_id_map =
$config_migration->
getIdMap();
// Rollback is not enabled for configuration translations.
$this->
assertFalse($config_migration->
getDestinationPlugin()->
supportsRollback());
// Import and validate config entities were created.
$config_executable =
new MigrateExecutable($config_migration,
$this);
$config_executable->
import();
$config =
$this->
config('system.site'
);
$this->
assertSame('Some site',
$config->
get('name'
));
$this->
assertSame('Awesome slogan',
$config->
get('slogan'
));
$map_row =
$config_id_map->
getRowBySource(['id' =>
$variable[0
]['id'
]]);
$this->
assertNotNull($map_row['destid1'
]);
// Rollback and verify the configuration changes are still there.