diff --git a/tests/src/Kernel/Plugin/Derivative/EntityReferenceRevisionsDeriverTest.php b/tests/src/Kernel/Plugin/Derivative/EntityReferenceRevisionsDeriverTest.php index 79ee8e5..e68cf05 100644 --- a/tests/src/Kernel/Plugin/Derivative/EntityReferenceRevisionsDeriverTest.php +++ b/tests/src/Kernel/Plugin/Derivative/EntityReferenceRevisionsDeriverTest.php @@ -18,7 +18,7 @@ class EntityReferenceRevisionsDeriverTest extends KernelTestBase { /** * {@inheritdoc} */ - public static $modules = ['migrate', 'entity_reference_revisions', 'err_migration_test', 'entity_composite_relationship_test']; + public static $modules = ['migrate', 'entity_reference_revisions', 'entity_composite_relationship_test']; /** * {@inheritdoc} @@ -34,13 +34,10 @@ protected function setUp() { * @covers ::getDerivativeDefinitions */ public function testDestinationDeriver() { - /** @var MigrationPluginManager $migrationManager */ - $migrationManager = \Drupal::service('plugin.manager.migration'); /** @var MigrateDestinationPluginManager $migrationDestinationManager */ $migrationDestinationManager = \Drupal::service('plugin.manager.migrate.destination'); - $definition = $migrationManager->getDefinition('err_migration_test'); - $destination = $migrationDestinationManager->getDefinition($definition['destination']['plugin']); + $destination = $migrationDestinationManager->getDefinition('entity_reference_revisions:entity_test_composite'); $this->assertEquals(EntityReferenceRevisions::class, $destination['class']); } diff --git a/tests/src/Kernel/Plugin/migrate/destination/EntityReferenceRevisionsDestinationTest.php b/tests/src/Kernel/Plugin/migrate/destination/EntityReferenceRevisionsDestinationTest.php index cb2be0e..56f0c74 100644 --- a/tests/src/Kernel/Plugin/migrate/destination/EntityReferenceRevisionsDestinationTest.php +++ b/tests/src/Kernel/Plugin/migrate/destination/EntityReferenceRevisionsDestinationTest.php @@ -263,9 +263,7 @@ public function testDestinationFieldMapping(array $datas) { $migrationExecutable->import(); foreach ($data['expected'] as $expected) { $entity = $storage->loadRevision($expected['id']); - $properties = array_filter($expected, function($key) { - return $key != 'id'; - }, ARRAY_FILTER_USE_KEY); + $properties = array_diff_key($expected, array_flip(['id'])); foreach ($properties as $property => $value) { if (is_array($value)) { foreach ($value as $delta => $item) {