You are here

public function MigrationPluginConfigurationTest::testConfigurationMerge in Drupal 10

Same name and namespace in other branches
  1. 8 core/modules/migrate/tests/src/Kernel/Plugin/MigrationPluginConfigurationTest.php \Drupal\Tests\migrate\Kernel\Plugin\MigrationPluginConfigurationTest::testConfigurationMerge()
  2. 9 core/modules/migrate/tests/src/Kernel/Plugin/MigrationPluginConfigurationTest.php \Drupal\Tests\migrate\Kernel\Plugin\MigrationPluginConfigurationTest::testConfigurationMerge()

Tests merging configuration into a plugin through the plugin manager.

@dataProvider mergeProvider

File

core/modules/migrate/tests/src/Kernel/Plugin/MigrationPluginConfigurationTest.php, line 31

Class

MigrationPluginConfigurationTest
Tests the migration plugin manager.

Namespace

Drupal\Tests\migrate\Kernel\Plugin

Code

public function testConfigurationMerge($id, $configuration, $expected) {

  /** @var \Drupal\migrate\Plugin\MigrationInterface $migration */
  $migration = $this->container
    ->get('plugin.manager.migration')
    ->createInstance($id, $configuration);
  $source_configuration = $migration
    ->getSourceConfiguration();
  $this
    ->assertEquals($expected, $source_configuration);
}