diff -u b/core/modules/migrate/tests/src/Unit/process/DedupeEntityTest.php b/core/modules/migrate/tests/src/Unit/process/DedupeEntityTest.php --- b/core/modules/migrate/tests/src/Unit/process/DedupeEntityTest.php +++ b/core/modules/migrate/tests/src/Unit/process/DedupeEntityTest.php @@ -2,6 +2,7 @@ namespace Drupal\Tests\migrate\Unit\process; +use Drupal\Core\Entity\Query\QueryInterface; use Drupal\migrate\Plugin\migrate\process\DedupeEntity; use Drupal\Component\Utility\Unicode; @@ -176,13 +177,10 @@ // 'test_vocab1'. $map = []; foreach (['forums', 'test_vocab', 'test_vocab1'] as $id) { - $query = $this->getMockBuilder('Drupal\Core\Entity\Query\QueryInterface') - ->disableOriginalConstructor() - ->getMock(); - $query->expects($this->once()) - ->method('execute') - ->will($this->returnValue($id === 'test_vocab1' ? [] : [$id])); - $map[] = ['test_field', $id, NULL, NULL, $query]; + $query = $this->prophesize(QueryInterface::class); + $query->willBeConstructedWith([]); + $query->execute()->willReturn($id === 'test_vocab1' ? [] : [$id]); + $map[] = ['test_field', $id, NULL, NULL, $query->reveal()]; } $this->entityQuery->expects($this->exactly(3)) ->method('condition')