public function MigrationLookupTest::successfulLookupDataProvider in Drupal 9
Same name and namespace in other branches
- 8 core/modules/migrate/tests/src/Unit/process/MigrationLookupTest.php \Drupal\Tests\migrate\Unit\process\MigrationLookupTest::successfulLookupDataProvider()
Provides data for the successful lookup test.
Return value
array The data.
File
- core/
modules/ migrate/ tests/ src/ Unit/ process/ MigrationLookupTest.php, line 180
Class
- MigrationLookupTest
- @coversDefaultClass \Drupal\migrate\Plugin\migrate\process\MigrationLookup @group migrate
Namespace
Drupal\Tests\migrate\Unit\processCode
public function successfulLookupDataProvider() {
return [
// Test data for scalar to scalar.
[
// Source ID of the migration map.
[
1,
],
// Destination ID of the migration map.
[
3,
],
// Input value for the migration plugin.
1,
// Expected output value of the migration plugin.
3,
],
// Test 0 as data source ID.
[
// Source ID of the migration map.
[
0,
],
// Destination ID of the migration map.
[
3,
],
// Input value for the migration plugin.
0,
// Expected output value of the migration plugin.
3,
],
// Test data for scalar to array.
[
// Source ID of the migration map.
[
1,
],
// Destination IDs of the migration map.
[
3,
'foo',
],
// Input value for the migration plugin.
1,
// Expected output values of the migration plugin.
[
3,
'foo',
],
],
// Test data for array to scalar.
[
// Source IDs of the migration map.
[
1,
3,
],
// Destination ID of the migration map.
[
'foo',
],
// Input values for the migration plugin.
[
1,
3,
],
// Expected output value of the migration plugin.
'foo',
],
// Test data for array to array.
[
// Source IDs of the migration map.
[
1,
3,
],
// Destination IDs of the migration map.
[
3,
'foo',
],
// Input values for the migration plugin.
[
1,
3,
],
// Expected output values of the migration plugin.
[
3,
'foo',
],
],
];
}