function DedupeEntityTest::setUp
Overrides MigrateProcessTestCase::setUp
File
-
core/
modules/ migrate/ tests/ src/ Unit/ process/ DedupeEntityTest.php, line 43
Class
- DedupeEntityTest
- @coversDefaultClass \Drupal\migrate\Plugin\migrate\process\DedupeEntity @group migrate @group legacy
Namespace
Drupal\Tests\migrate\Unit\processCode
protected function setUp() {
$this->entityQuery = $this->getMockBuilder('Drupal\\Core\\Entity\\Query\\QueryInterface')
->disableOriginalConstructor()
->getMock();
$this->entityTypeManager = $this->createMock(EntityTypeManagerInterface::class);
$storage = $this->createMock(EntityStorageInterface::class);
$storage->expects($this->any())
->method('getQuery')
->willReturn($this->entityQuery);
$this->entityTypeManager
->expects($this->any())
->method('getStorage')
->with('test_entity_type')
->willReturn($storage);
parent::setUp();
}
Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.