function SubProcessTest::providerTestSubProcess

Same name in other branches
  1. 9 core/modules/migrate/tests/src/Unit/process/SubProcessTest.php \Drupal\Tests\migrate\Unit\process\SubProcessTest::providerTestSubProcess()
  2. 8.9.x core/modules/migrate/tests/src/Unit/process/SubProcessTest.php \Drupal\Tests\migrate\Unit\process\SubProcessTest::providerTestSubProcess()
  3. 10 core/modules/migrate/tests/src/Unit/process/SubProcessTest.php \Drupal\Tests\migrate\Unit\process\SubProcessTest::providerTestSubProcess()

Data provider for testSubProcess().

File

core/modules/migrate/tests/src/Unit/process/SubProcessTest.php, line 89

Class

SubProcessTest
Tests the sub_process process plugin.

Namespace

Drupal\Tests\migrate\Unit\process

Code

public static function providerTestSubProcess() {
    return [
        'no source context' => [
            'process_configuration' => [
                'process' => [
                    'foo' => 'source_foo',
                    'id' => 'source_id',
                ],
                'key' => '@id',
            ],
        ],
        'default source key' => [
            'process_configuration' => [
                'process' => [
                    'foo' => 'source_foo',
                    'id' => 'source_id',
                    'baaa' => 'source/baf',
                ],
                'key' => '@id',
                'include_source' => TRUE,
            ],
            'source_values' => [
                'baf' => 'source_baz',
            ],
        ],
        'renamed source key' => [
            'process_configuration' => [
                'process' => [
                    'foo' => 'source_foo',
                    'id' => 'source_id',
                    'baaa' => 'my_source/baf',
                ],
                'key' => '@id',
                'include_source' => TRUE,
                'source_key' => 'my_source',
            ],
            'source_values' => [
                'baf' => 'source_baz',
            ],
        ],
    ];
}

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