function MigrationTest::testGetProcessPluginsExceptionMessage

Same name in other branches
  1. 9 core/modules/migrate/tests/src/Kernel/Plugin/MigrationTest.php \Drupal\Tests\migrate\Kernel\Plugin\MigrationTest::testGetProcessPluginsExceptionMessage()
  2. 8.9.x core/modules/migrate/tests/src/Kernel/Plugin/MigrationTest.php \Drupal\Tests\migrate\Kernel\Plugin\MigrationTest::testGetProcessPluginsExceptionMessage()
  3. 10 core/modules/migrate/tests/src/Kernel/Plugin/MigrationTest.php \Drupal\Tests\migrate\Kernel\Plugin\MigrationTest::testGetProcessPluginsExceptionMessage()

Tests Migration::getProcessPlugins()

@covers ::getProcessPlugins

@dataProvider getProcessPluginsExceptionMessageProvider

Parameters

array $process: The migration process pipeline.

File

core/modules/migrate/tests/src/Kernel/Plugin/MigrationTest.php, line 56

Class

MigrationTest
Tests the migration plugin.

Namespace

Drupal\Tests\migrate\Kernel\Plugin

Code

public function testGetProcessPluginsExceptionMessage(array $process) : void {
    // Test with an invalid process pipeline.
    $plugin_definition = [
        'id' => 'foo',
        'process' => $process,
    ];
    $destination = array_key_first($process);
    $migration = \Drupal::service('plugin.manager.migration')->createStubMigration($plugin_definition);
    $this->expectException(MigrateException::class);
    $this->expectExceptionMessage("Invalid process for destination '{$destination}' in migration 'foo'");
    $migration->getProcessPlugins();
}

Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.