public function DrushTest::testReset in Migrate Tools 8.4
Same name and namespace in other branches
- 8.5 tests/src/Kernel/DrushTest.php \Drupal\Tests\migrate_tools\Kernel\DrushTest::testReset()
Tests drush mrs.
Throws
\Drupal\Component\Plugin\Exception\PluginException
File
- tests/
src/ Kernel/ DrushTest.php, line 221
Class
- DrushTest
- Tests for the Drush 9 commands.
Namespace
Drupal\Tests\migrate_tools\KernelCode
public function testReset() {
/** @var \Drupal\migrate\Plugin\MigrationInterface $migration */
$migration = $this->migrationPluginManager
->createInstance('fruit_terms');
$migration
->setStatus(MigrationInterface::STATUS_IMPORTING);
$status = $this->commands
->status('fruit_terms', [
'group' => NULL,
'tag' => NULL,
'names-only' => FALSE,
])
->getArrayCopy()[0]['status'];
$this
->assertSame('Importing', $status);
$this->commands
->resetStatus('fruit_terms');
$this
->assertSame(MigrationInterface::STATUS_IDLE, $migration
->getStatus());
}