function MigrationTest::testGetDestinationPlugin

Same name in other branches
  1. 9 core/modules/migrate/tests/src/Kernel/Plugin/MigrationTest.php \Drupal\Tests\migrate\Kernel\Plugin\MigrationTest::testGetDestinationPlugin()
  2. 10 core/modules/migrate/tests/src/Kernel/Plugin/MigrationTest.php \Drupal\Tests\migrate\Kernel\Plugin\MigrationTest::testGetDestinationPlugin()
  3. 11.x 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);
}

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