function MigrationLookupTest::successfulLookupDataProvider
Same name in other branches
- 9 core/modules/migrate/tests/src/Unit/process/MigrationLookupTest.php \Drupal\Tests\migrate\Unit\process\MigrationLookupTest::successfulLookupDataProvider()
- 8.9.x core/modules/migrate/tests/src/Unit/process/MigrationLookupTest.php \Drupal\Tests\migrate\Unit\process\MigrationLookupTest::successfulLookupDataProvider()
- 11.x 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 216
Class
- MigrationLookupTest
- @coversDefaultClass \Drupal\migrate\Plugin\migrate\process\MigrationLookup @group migrate
Namespace
Drupal\Tests\migrate\Unit\processCode
public static 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',
],
],
];
}
Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.