function HandleMultiplesTest::scalarAndMultipleValuesProviderSource

Same name and namespace in other branches
  1. 9 core/modules/migrate/tests/src/Kernel/process/HandleMultiplesTest.php \Drupal\Tests\migrate\Kernel\process\HandleMultiplesTest::scalarAndMultipleValuesProviderSource()
  2. 8.9.x core/modules/migrate/tests/src/Kernel/process/HandleMultiplesTest.php \Drupal\Tests\migrate\Kernel\process\HandleMultiplesTest::scalarAndMultipleValuesProviderSource()
  3. 10 core/modules/migrate/tests/src/Kernel/process/HandleMultiplesTest.php \Drupal\Tests\migrate\Kernel\process\HandleMultiplesTest::scalarAndMultipleValuesProviderSource()

Provides the source data with scalar and multiple values.

Return value

array

File

core/modules/migrate/tests/src/Kernel/process/HandleMultiplesTest.php, line 141

Class

HandleMultiplesTest
Tests process pipelines with scalar and multiple values handling.

Namespace

Drupal\Tests\migrate\Kernel\process

Code

public static function scalarAndMultipleValuesProviderSource() {
    return [
        [
            'source_data' => [
                'id' => '1',
                // Source value for the first pipeline.
'scalar' => 'foo/bar',
                // Source value for the second pipeline.
'multiple' => [
                    'foo',
                    'bar/baz',
                ],
            ],
            'expected_data' => [
                // Expected value from the first pipeline.
'first' => 'BAR',
                // Expected value from the second pipeline.
'second' => [
                    'BAR',
                    'BAZ',
                ],
                'get_from_single' => [
                    'foo',
                    'bar/baz',
                ],
                'get_from_multiple' => 'foo/bar',
            ],
        ],
    ];
}

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