DrushBatchImportTest.php in Migrate Tools 8.4
File
tests/src/Functional/DrushBatchImportTest.php
View source
<?php
namespace Drupal\Tests\migrate_tools\Functional;
use Drupal\Tests\BrowserTestBase;
use Drush\TestTraits\DrushTestTrait;
class DrushBatchImportTest extends BrowserTestBase {
use DrushTestTrait;
protected static $modules = [
'migrate_tools_test',
'migrate_tools',
'migrate_plus',
'taxonomy',
'text',
'system',
'user',
];
public function testBatchImportInDrushComand() {
$this
->drush('migrate:batch-import-fruit');
$migration = \Drupal::service('plugin.manager.migration')
->createInstance('fruit_terms');
$id_map = $migration
->getIdMap();
$this
->assertSame(3, $id_map
->importedCount());
}
}