function MigrateStubTest::testErrorOnMigrationNotFound
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,
]);
}
Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.