protected function QueryBatchTest::getPlugin in Drupal 9
Same name and namespace in other branches
- 8 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.
3 calls to QueryBatchTest::getPlugin()
- QueryBatchTest::testBatchSizeNegative in core/
modules/ migrate/ tests/ src/ Kernel/ QueryBatchTest.php - Tests a negative batch size throws an exception.
- QueryBatchTest::testBatchSizeNonInteger in core/
modules/ migrate/ tests/ src/ Kernel/ QueryBatchTest.php - Tests a non integer batch size throws an exception.
- QueryBatchTest::testQueryBatch in core/
modules/ migrate/ tests/ src/ Kernel/ QueryBatchTest.php - Tests query batch size.
File
- core/
modules/ migrate/ tests/ src/ Kernel/ QueryBatchTest.php, line 209
Class
- QueryBatchTest
- Tests query batching.
Namespace
Drupal\Tests\migrate\KernelCode
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;
}