You are here

public function DrushCommandsTest::testLimit in Migrate Tools 8.4

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

Tests migrate:import with limit.

File

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

Class

DrushCommandsTest
Execute drush on fully functional website.

Namespace

Drupal\Tests\migrate_tools\Functional

Code

public function testLimit() {
  $this
    ->drush('mim', [
    'fruit_terms',
  ], [
    'limit' => 2,
  ]);
  $expected = [
    '1/3 [=========>------------------]  33%',
    ' 2/3 [==================>---------]  66% [notice] Processed 2 items (2 created, 0 updated, 0 failed, 0 ignored) - done with \'fruit_terms\'',
  ];
  $this
    ->assertEquals($expected, $this
    ->getErrorOutputAsList());
}