Loading core/modules/migrate/tests/src/Kernel/MigrateLookupTest.php +0 −11 Original line number Diff line number Diff line Loading @@ -2,7 +2,6 @@ namespace Drupal\Tests\migrate\Kernel; use Drupal\Component\Plugin\Exception\PluginNotFoundException; use Drupal\migrate\MigrateException; use Drupal\Tests\node\Traits\ContentTypeCreationTrait; Loading Loading @@ -78,16 +77,6 @@ public function testInvalidIdLookup() { $this->migrateLookup->lookup('sample_lookup_migration', ['invalid_id' => 25]); } /** * Tests an invalid lookup. */ 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]); } /** * Tests lookups with multiple source ids. */ Loading core/modules/migrate/tests/src/Kernel/MigrateStubTest.php +0 −10 Original line number Diff line number Diff line Loading @@ -2,7 +2,6 @@ namespace Drupal\Tests\migrate\Kernel; use Drupal\Component\Plugin\Exception\PluginNotFoundException; use Drupal\Tests\node\Traits\ContentTypeCreationTrait; /** Loading Loading @@ -118,13 +117,4 @@ public function testInvalidSourceIdKeys() { $this->migrateStub->createStub('sample_stubbing_migration_with_multiple_source_ids', ['id' => 17, 'not_a_key' => 17]); } /** * Tests that an exception is thrown if a migration does not exist. */ public function testErrorOnMigrationNotFound() { $this->expectException(PluginNotFoundException::class); $this->expectExceptionMessage("Plugin ID 'nonexistent_migration' was not found."); $this->migrateStub->createStub('nonexistent_migration', [1]); } } core/modules/migrate/tests/src/Unit/MigrateLookupTest.php +1 −0 Original line number Diff line number Diff line Loading @@ -53,6 +53,7 @@ public function testExceptionOnMigrationNotFound() { $migration_plugin_manager = $this->prophesize(MigrationPluginManagerInterface::class); $migration_plugin_manager->createInstances('bad_plugin')->willReturn([]); $this->expectException(PluginNotFoundException::class); $this->expectExceptionMessage("Plugin ID 'bad_plugin' was not found."); $lookup = new MigrateLookup($migration_plugin_manager->reveal()); $lookup->lookup('bad_plugin', [1]); } Loading core/modules/migrate/tests/src/Unit/MigrateStubTest.php +1 −0 Original line number Diff line number Diff line Loading @@ -72,6 +72,7 @@ public function testCreateStub() { public function testExceptionOnPluginNotFound() { $this->migrationPluginManager->createInstances(['test_migration'])->willReturn([]); $this->expectException(PluginNotFoundException::class); $this->expectExceptionMessage("Plugin ID 'test_migration' was not found."); $stub = new MigrateStub($this->migrationPluginManager->reveal()); $stub->createStub('test_migration', [1]); } Loading Loading
core/modules/migrate/tests/src/Kernel/MigrateLookupTest.php +0 −11 Original line number Diff line number Diff line Loading @@ -2,7 +2,6 @@ namespace Drupal\Tests\migrate\Kernel; use Drupal\Component\Plugin\Exception\PluginNotFoundException; use Drupal\migrate\MigrateException; use Drupal\Tests\node\Traits\ContentTypeCreationTrait; Loading Loading @@ -78,16 +77,6 @@ public function testInvalidIdLookup() { $this->migrateLookup->lookup('sample_lookup_migration', ['invalid_id' => 25]); } /** * Tests an invalid lookup. */ 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]); } /** * Tests lookups with multiple source ids. */ Loading
core/modules/migrate/tests/src/Kernel/MigrateStubTest.php +0 −10 Original line number Diff line number Diff line Loading @@ -2,7 +2,6 @@ namespace Drupal\Tests\migrate\Kernel; use Drupal\Component\Plugin\Exception\PluginNotFoundException; use Drupal\Tests\node\Traits\ContentTypeCreationTrait; /** Loading Loading @@ -118,13 +117,4 @@ public function testInvalidSourceIdKeys() { $this->migrateStub->createStub('sample_stubbing_migration_with_multiple_source_ids', ['id' => 17, 'not_a_key' => 17]); } /** * Tests that an exception is thrown if a migration does not exist. */ public function testErrorOnMigrationNotFound() { $this->expectException(PluginNotFoundException::class); $this->expectExceptionMessage("Plugin ID 'nonexistent_migration' was not found."); $this->migrateStub->createStub('nonexistent_migration', [1]); } }
core/modules/migrate/tests/src/Unit/MigrateLookupTest.php +1 −0 Original line number Diff line number Diff line Loading @@ -53,6 +53,7 @@ public function testExceptionOnMigrationNotFound() { $migration_plugin_manager = $this->prophesize(MigrationPluginManagerInterface::class); $migration_plugin_manager->createInstances('bad_plugin')->willReturn([]); $this->expectException(PluginNotFoundException::class); $this->expectExceptionMessage("Plugin ID 'bad_plugin' was not found."); $lookup = new MigrateLookup($migration_plugin_manager->reveal()); $lookup->lookup('bad_plugin', [1]); } Loading
core/modules/migrate/tests/src/Unit/MigrateStubTest.php +1 −0 Original line number Diff line number Diff line Loading @@ -72,6 +72,7 @@ public function testCreateStub() { public function testExceptionOnPluginNotFound() { $this->migrationPluginManager->createInstances(['test_migration'])->willReturn([]); $this->expectException(PluginNotFoundException::class); $this->expectExceptionMessage("Plugin ID 'test_migration' was not found."); $stub = new MigrateStub($this->migrationPluginManager->reveal()); $stub->createStub('test_migration', [1]); } Loading