You are here

public function MigratePluginAltererTest::testGetSourceValueOfMigrationProcess in Media Migration 8

Tests getSourceValueOfMigrationProcess().

@covers ::getSourceValueOfMigrationProcess

@dataProvider getSourceValueOfMigrationProcessProvider

File

tests/src/Unit/MigratePluginAltererTest.php, line 24

Class

MigratePluginAltererTest
Tests MigratePluginAlterer.

Namespace

Drupal\Tests\media_migration\Unit

Code

public function testGetSourceValueOfMigrationProcess(array $migration, string $process_property_key, $expected_return, $expected_exception) {
  if (!empty($expected_exception)) {
    $this
      ->expectException($expected_exception['class']);
    $this
      ->expectExceptionMessage($expected_exception['message']);
  }
  $this
    ->assertSame($expected_return, MigratePluginAlterer::getSourceValueOfMigrationProcess($migration, $process_property_key));
}