You are here

public function ExtractTest::getDefinition in Drupal 10

Same name and namespace in other branches
  1. 8 core/modules/migrate/tests/src/Kernel/process/ExtractTest.php \Drupal\Tests\migrate\Kernel\process\ExtractTest::getDefinition()
  2. 9 core/modules/migrate/tests/src/Kernel/process/ExtractTest.php \Drupal\Tests\migrate\Kernel\process\ExtractTest::getDefinition()

Returns test migration definition.

Return value

array

1 call to ExtractTest::getDefinition()
ExtractTest::testMultipleValueExplode in core/modules/migrate/tests/src/Kernel/process/ExtractTest.php
Tests multiple value handling.

File

core/modules/migrate/tests/src/Kernel/process/ExtractTest.php, line 26

Class

ExtractTest
Tests the extract process plugin.

Namespace

Drupal\Tests\migrate\Kernel\process

Code

public function getDefinition() {
  return [
    'source' => [
      'plugin' => 'embedded_data',
      'data_rows' => [],
      'ids' => [
        'id' => [
          'type' => 'string',
        ],
      ],
    ],
    'process' => [
      'first' => [
        'plugin' => 'extract',
        'index' => [
          0,
        ],
        'source' => 'simple_array',
      ],
      'second' => [
        'plugin' => 'extract',
        'index' => [
          1,
        ],
        'source' => 'complex_array',
      ],
    ],
    'destination' => [
      'plugin' => 'config',
      'config_name' => 'migrate_test.settings',
    ],
  ];
}