function MigrateLookupTest::testExceptionOnMultipleMigrationsNotFound

Same name in other branches
  1. 9 core/modules/migrate/tests/src/Unit/MigrateLookupTest.php \Drupal\Tests\migrate\Unit\MigrateLookupTest::testExceptionOnMultipleMigrationsNotFound()
  2. 10 core/modules/migrate/tests/src/Unit/MigrateLookupTest.php \Drupal\Tests\migrate\Unit\MigrateLookupTest::testExceptionOnMultipleMigrationsNotFound()

Tests message logged when multiple migrations are not found.

@dataProvider providerExceptionOnMultipleMigrationsNotFound

File

core/modules/migrate/tests/src/Unit/MigrateLookupTest.php, line 87

Class

MigrateLookupTest
Provides unit testing for the migration lookup service.

Namespace

Drupal\Tests\migrate\Unit

Code

public function testExceptionOnMultipleMigrationsNotFound($migrations, $message) : void {
    $migration_plugin_manager = $this->prophesize(MigrationPluginManagerInterface::class);
    $migration_plugin_manager->createInstances($migrations)
        ->willReturn([]);
    $this->expectException(PluginException::class);
    $this->expectExceptionMessage($message);
    $lookup = new MigrateLookup($migration_plugin_manager->reveal());
    $lookup->lookup($migrations, [
        1,
    ]);
}

Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.