function ExtractTest::getDefinition

Same name in other branches
  1. 9 core/modules/migrate/tests/src/Kernel/process/ExtractTest.php \Drupal\Tests\migrate\Kernel\process\ExtractTest::getDefinition()
  2. 8.9.x core/modules/migrate/tests/src/Kernel/process/ExtractTest.php \Drupal\Tests\migrate\Kernel\process\ExtractTest::getDefinition()
  3. 10 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 28

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',
        ],
    ];
}

Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.