function QueryBatchTest::setUp
Same name in other branches
- 9 core/modules/migrate/tests/src/Kernel/QueryBatchTest.php \Drupal\Tests\migrate\Kernel\QueryBatchTest::setUp()
- 8.9.x core/modules/migrate/tests/src/Kernel/QueryBatchTest.php \Drupal\Tests\migrate\Kernel\QueryBatchTest::setUp()
- 11.x core/modules/migrate/tests/src/Kernel/QueryBatchTest.php \Drupal\Tests\migrate\Kernel\QueryBatchTest::setUp()
Overrides KernelTestBase::setUp
File
-
core/
modules/ migrate/ tests/ src/ Kernel/ QueryBatchTest.php, line 40
Class
- QueryBatchTest
- Tests query batching.
Namespace
Drupal\Tests\migrate\KernelCode
protected function setUp() : void {
parent::setUp();
// Create a mock migration. This will be injected into the source plugin
// under test.
$this->migration = $this->prophesize(MigrationInterface::class);
$this->migration
->id()
->willReturn($this->randomMachineName(16));
// Prophesize a useless ID map plugin and an empty set of destination IDs.
// Calling code can override these prophecies later and set up different
// behaviors.
$this->migration
->getIdMap()
->willReturn($this->prophesize(MigrateIdMapInterface::class)
->reveal());
$this->migration
->getDestinationIds()
->willReturn([]);
}
Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.