You are here

public function MigrateUpgradeDrushRunnerTest::testIdSubstitution in Migrate Upgrade 8.3

Test the id substitution functions.

@covers ::substituteIds @covers ::substituteMigrationIds

@dataProvider getData

Parameters

array $source: The source data.

array $expected: The expected results.

File

tests/src/Unit/MigrateUpgradeDrushRunnerTest.php, line 30

Class

MigrateUpgradeDrushRunnerTest
Tests for the MigrateUpgradeDrushRunner class.

Namespace

Drupal\Tests\migrate_upgrade\Unit

Code

public function testIdSubstitution(array $source, array $expected) : void {
  $loggerProphet = $this
    ->prophesize(LoggerInterface::class);
  $runner = new TestMigrateUpgradeDrushRunner($loggerProphet
    ->reveal());
  $results = $runner
    ->substituteIds($source);
  $this
    ->assertSame($expected, $results);
}