function MigrateLookupTest::testExceptionOnMigrationNotFound
Same name in other branches
- 9 core/modules/migrate/tests/src/Unit/MigrateLookupTest.php \Drupal\Tests\migrate\Unit\MigrateLookupTest::testExceptionOnMigrationNotFound()
- 10 core/modules/migrate/tests/src/Unit/MigrateLookupTest.php \Drupal\Tests\migrate\Unit\MigrateLookupTest::testExceptionOnMigrationNotFound()
- 11.x core/modules/migrate/tests/src/Unit/MigrateLookupTest.php \Drupal\Tests\migrate\Unit\MigrateLookupTest::testExceptionOnMigrationNotFound()
Tests that an appropriate message is logged if a PluginException is thrown.
File
-
core/
modules/ migrate/ tests/ src/ Unit/ MigrateLookupTest.php, line 52
Class
- MigrateLookupTest
- Provides unit testing for the migration lookup service.
Namespace
Drupal\Tests\migrate\UnitCode
public function testExceptionOnMigrationNotFound() {
$migration_plugin_manager = $this->prophesize(MigrationPluginManagerInterface::class);
$migration_plugin_manager->createInstances('bad_plugin')
->willReturn([]);
$this->expectException(PluginNotFoundException::class);
$lookup = new MigrateLookup($migration_plugin_manager->reveal());
$lookup->lookup('bad_plugin', [
1,
]);
}
Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.