You are here

protected function QueryBatchTest::getPlugin in Drupal 10

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

Instantiates the source plugin under test.

Parameters

array $configuration: The source plugin configuration.

Return value

\Drupal\migrate\Plugin\MigrateSourceInterface|object The fully configured source plugin.

File

core/modules/migrate/tests/src/Kernel/QueryBatchTest.php, line 209

Class

QueryBatchTest
Tests query batching.

Namespace

Drupal\Tests\migrate\Kernel

Code

protected function getPlugin($configuration) {

  /** @var \Drupal\migrate\Plugin\MigratePluginManager $plugin_manager */
  $plugin_manager = $this->container
    ->get('plugin.manager.migrate.source');
  $plugin = $plugin_manager
    ->createInstance('query_batch_test', $configuration, $this->migration
    ->reveal());
  $this->migration
    ->getSourcePlugin()
    ->willReturn($plugin);
  return $plugin;
}