You are here

public function DrushCommandsTest::testFeedback in Migrate Tools 8.5

Same name and namespace in other branches
  1. 8.4 tests/src/Functional/DrushCommandsTest.php \Drupal\Tests\migrate_tools\Functional\DrushCommandsTest::testFeedback()

Tests migrate:import with feedback.

Throws

\Drupal\Component\Plugin\Exception\PluginException

File

tests/src/Functional/DrushCommandsTest.php, line 39

Class

DrushCommandsTest
Execute drush on fully functional website.

Namespace

Drupal\Tests\migrate_tools\Functional

Code

public function testFeedback() : void {
  $this
    ->drush('mim', [
    'fruit_terms',
  ], [
    'feedback' => 2,
  ]);
  $this
    ->assertStringContainsString('1/3', $this
    ->getErrorOutput());
  $this
    ->assertStringContainsString('[notice] Processed 2 items (2 created, 0 updated, 0 failed, 0 ignored) - continuing with \'fruit_terms\'', $this
    ->getErrorOutput());
  $this
    ->assertStringContainsString('3/3', $this
    ->getErrorOutput());
  $this
    ->assertStringContainsString('[notice] Processed 1 item (1 created, 0 updated, 0 failed, 0 ignored) - done with \'fruit_terms\'', $this
    ->getErrorOutput());
  $this
    ->assertStringNotContainsString('4', $this
    ->getErrorOutput());
}