You are here

public function MigrateLookupTest::testInvalidMigrationLookup in Drupal 8

Tests an invalid lookup.

File

core/modules/migrate/tests/src/Kernel/MigrateLookupTest.php, line 84

Class

MigrateLookupTest
Tests the Migrate Lookup service.

Namespace

Drupal\Tests\migrate\Kernel

Code

public function testInvalidMigrationLookup() {
  $this
    ->expectException(PluginNotFoundException::class);
  $this
    ->expectExceptionMessage("Plugin ID 'invalid_migration' was not found.");

  // Test invalid migration_id.
  $this->migrateLookup
    ->lookup('invalid_migration', [
    'id' => 1337,
  ]);
}