public function MigrationLookupTest::testMultipleSourceIds in Drupal 8
Same name and namespace in other branches
- 9 core/modules/migrate/tests/src/Unit/process/MigrationLookupTest.php \Drupal\Tests\migrate\Unit\process\MigrationLookupTest::testMultipleSourceIds()
Tests processing multiple source IDs.
File
- core/
modules/ migrate/ tests/ src/ Unit/ process/ MigrationLookupTest.php, line 244
Class
- MigrationLookupTest
- @coversDefaultClass \Drupal\migrate\Plugin\migrate\process\MigrationLookup @group migrate
Namespace
Drupal\Tests\migrate\Unit\processCode
public function testMultipleSourceIds() {
$migration_plugin = $this
->prophesize(MigrationInterface::class);
$this->migrateLookup
->lookup('foobaz', [
'id',
6,
])
->willReturn([
[
2,
],
]);
$configuration = [
'migration' => 'foobaz',
];
$migration = MigrationLookup::create($this
->prepareContainer(), $configuration, '', [], $migration_plugin
->reveal());
$result = $migration
->transform([
'id',
6,
], $this->migrateExecutable, $this->row, '');
$this
->assertEquals(2, $result);
}