public function MigrateTableIncrementTest::tableDestinationMigration in Migrate Plus 8.5
Create a minimally valid migration with some source data.
Return value
array The migration definition.
File
- tests/
src/ Kernel/ MigrateTableIncrementTest.php, line 71
Class
- MigrateTableIncrementTest
- Tests migration destination table with auto-increment keys.
Namespace
Drupal\Tests\migrate_plus\KernelCode
public function tableDestinationMigration() : array {
return [
'dummy table' => [
[
'id' => 'migration_table_test',
'migration_tags' => [
'Testing',
],
'source' => [
'plugin' => 'embedded_data',
'data_rows' => [
[
'data1' => 'dummy1 value1',
'data2' => 'dummy2 value1',
],
[
'data1' => 'dummy1 value2',
'data2' => 'dummy2 value2',
],
[
'data1' => 'dummy1 value3',
'data2' => 'dummy2 value3',
],
],
'ids' => [
'data1' => [
'type' => 'string',
],
],
],
'destination' => [
'plugin' => 'table',
'table_name' => static::TABLE_NAME,
'id_fields' => [
'id' => [
'type' => 'integer',
'use_auto_increment' => TRUE,
],
],
],
'process' => [
'data1' => 'data1',
'data2' => 'data2',
],
],
],
];
}