You are here

public function MigrateToolsTestCommands::batchImportFruit in Migrate Tools 8.5

Same name and namespace in other branches
  1. 8.4 tests/modules/migrate_tools_test/src/Commands/MigrateToolsTestCommands.php \Drupal\migrate_tools_test\Commands\MigrateToolsTestCommands::batchImportFruit()

Run a batch import of fruit terms as a test.

@command migrate:batch-import-fruit

File

tests/modules/migrate_tools_test/src/Commands/MigrateToolsTestCommands.php, line 38

Class

MigrateToolsTestCommands
Migrate Tools Test drush commands.

Namespace

Drupal\migrate_tools_test\Commands

Code

public function batchImportFruit() {
  $fruit_migration = $this->migrationPluginManager
    ->createInstance('fruit_terms');
  $executable = new MigrateBatchExecutable($fruit_migration, new MigrateMessage());
  $executable
    ->batchImport();
  drush_backend_batch_process();
}