You are here

public function MigrateSqlIdMapTest::testGetHighestIdInvalid in Drupal 8

Same name and namespace in other branches
  1. 9 core/modules/migrate/tests/src/Unit/MigrateSqlIdMapTest.php \Drupal\Tests\migrate\Unit\MigrateSqlIdMapTest::testGetHighestIdInvalid()

Tests getHighestId method with invalid data.

@dataProvider getHighestIdInvalidDataProvider

Parameters

array $destination_ids: Array of destination ids.

File

core/modules/migrate/tests/src/Unit/MigrateSqlIdMapTest.php, line 1167

Class

MigrateSqlIdMapTest
Tests the SQL ID map plugin.

Namespace

Drupal\Tests\migrate\Unit

Code

public function testGetHighestIdInvalid(array $destination_ids) {
  $this
    ->expectException(\LogicException::class);
  $this
    ->expectExceptionMessage('To determine the highest migrated ID the first ID must be an integer');
  $this->destinationIds = $destination_ids;
  $id_map = $this
    ->getIdMap();
  $id_map
    ->getHighestId();
}