You are here

public function SubProcessTest::providerTestSubProcess in Drupal 8

Data provider for testSubProcess().

File

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

Class

SubProcessTest
Tests the sub_process process plugin.

Namespace

Drupal\Tests\migrate\Unit\process

Code

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