You are here

public function MigrationTest::testGetDestinationPlugin in Drupal 8

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

Tests Migration::getDestinationPlugin()

@covers ::getDestinationPlugin

File

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

Class

MigrationTest
Tests the migration plugin.

Namespace

Drupal\Tests\migrate\Kernel\Plugin

Code

public function testGetDestinationPlugin() {
  $migration = \Drupal::service('plugin.manager.migration')
    ->createStubMigration([
    'destination' => [
      'no_stub' => TRUE,
    ],
  ]);
  $this
    ->expectException(MigrateSkipRowException::class);
  $this
    ->expectExceptionMessage("Stub requested but not made because no_stub configuration is set.");
  $migration
    ->getDestinationPlugin(TRUE);
}