protected function MigrateTableTest::getTableDestinationMigration in Migrate Plus 8.3
Same name and namespace in other branches
- 8.4 tests/src/Kernel/MigrateTableTest.php \Drupal\Tests\migrate_plus\Kernel\MigrateTableTest::getTableDestinationMigration()
2 calls to MigrateTableTest::getTableDestinationMigration()
- MigrateTableTest::testTableDestination in tests/
src/ Kernel/ MigrateTableTest.php - Tests table destination.
- MigrateTableTest::testTableRollback in tests/
src/ Kernel/ MigrateTableTest.php
File
- tests/
src/ Kernel/ MigrateTableTest.php, line 59
Class
- MigrateTableTest
- Tests migration destination table.
Namespace
Drupal\Tests\migrate_plus\KernelCode
protected function getTableDestinationMigration() {
// Create a minimally valid migration with some source data.
$definition = [
'id' => 'migration_table_test',
'migration_tags' => [
'Testing',
],
'source' => [
'plugin' => 'embedded_data',
'data_rows' => [
[
'data' => 'dummy value',
'data2' => 'dummy2 value',
'data3' => 'dummy3 value',
],
[
'data' => 'dummy value2',
'data2' => 'dummy2 value2',
'data3' => 'dummy3 value2',
],
[
'data' => 'dummy value3',
'data2' => 'dummy2 value3',
'data3' => 'dummy3 value3',
],
],
'ids' => [
'data' => [
'type' => 'string',
],
],
],
'destination' => [
'plugin' => 'table',
'table_name' => static::TABLE_NAME,
'id_fields' => [
'data' => [
'type' => 'string',
],
],
],
'process' => [
'data' => 'data',
'data2' => 'data2',
'data3' => 'data3',
],
];
return $definition;
}