You are here

public function DrushTest::testFailingImportThrowsException in Migrate Tools 8.5

Same name and namespace in other branches
  1. 8.4 tests/src/Kernel/DrushTest.php \Drupal\Tests\migrate_tools\Kernel\DrushTest::testFailingImportThrowsException()

Tests that a failing import throws an exception (i.e. exit code).

File

tests/src/Kernel/DrushTest.php, line 150

Class

DrushTest
Tests for the Drush 9 commands.

Namespace

Drupal\Tests\migrate_tools\Kernel

Code

public function testFailingImportThrowsException() : void {
  $this
    ->expectException(\Exception::class);
  $this
    ->expectExceptionMessage('source_exception migration failed.');
  $this->commands
    ->import('source_exception', $this->importBaseOptions);
}