diff --git a/core/modules/migrate/tests/src/Unit/process/MigrationTest.php b/core/modules/migrate/tests/src/Unit/process/MigrationTest.php index cd406cc..b62c1f9 100644 --- a/core/modules/migrate/tests/src/Unit/process/MigrationTest.php +++ b/core/modules/migrate/tests/src/Unit/process/MigrationTest.php @@ -115,9 +115,9 @@ public function testSkipOnEmpty() { * @param array $destination_id_values * The destination id(s) of the migration map. * @param string|array $source_value - * The source value for the migration process plugin. + * The source value(s) for the migration process plugin. * @param string|array $expected_value - * The expected value of the migration process plugin. + * The expected value(s) of the migration process plugin. */ public function testSuccessfulLookup($source_id_values, $destination_id_values, $source_value, $expected_value) { $migration_plugin = $this->prophesize(MigrationInterface::class); @@ -152,24 +152,50 @@ public function testSuccessfulLookup($source_id_values, $destination_id_values, */ 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 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'], + ], ]; }