public function ExtractTest::testMultipleValueExplode in Drupal 9
Same name and namespace in other branches
- 8 core/modules/migrate/tests/src/Kernel/process/ExtractTest.php \Drupal\Tests\migrate\Kernel\process\ExtractTest::testMultipleValueExplode()
- 10 core/modules/migrate/tests/src/Kernel/process/ExtractTest.php \Drupal\Tests\migrate\Kernel\process\ExtractTest::testMultipleValueExplode()
Tests multiple value handling.
@dataProvider multipleValueProviderSource
Parameters
array $source_data:
array $expected_data:
File
- core/
modules/ migrate/ tests/ src/ Kernel/ process/ ExtractTest.php, line 62
Class
- ExtractTest
- Tests the extract process plugin.
Namespace
Drupal\Tests\migrate\Kernel\processCode
public function testMultipleValueExplode(array $source_data, array $expected_data) {
$definition = $this
->getDefinition();
$definition['source']['data_rows'] = [
$source_data,
];
$migration = \Drupal::service('plugin.manager.migration')
->createStubMigration($definition);
$executable = new MigrateExecutable($migration);
$result = $executable
->import();
// Migration needs to succeed before further assertions are made.
$this
->assertSame(MigrationInterface::RESULT_COMPLETED, $result);
// Compare with expected data.
$this
->assertEquals($expected_data, \Drupal::config('migrate_test.settings')
->get());
}