public function MigrateStubTest::testErrorOnMigrationNotFound in Drupal 8
Tests that an exception is thrown if a migration does not exist.
File
- core/
modules/ migrate/ tests/ src/ Kernel/ MigrateStubTest.php, line 124
Class
- MigrateStubTest
- Tests the migrate.stub Service.
Namespace
Drupal\Tests\migrate\KernelCode
public function testErrorOnMigrationNotFound() {
$this
->expectException(PluginNotFoundException::class);
$this
->expectExceptionMessage("Plugin ID 'nonexistent_migration' was not found.");
$this->migrateStub
->createStub('nonexistent_migration', [
1,
]);
}