diff --git a/core/modules/migrate/tests/src/Unit/RowTest.php b/core/modules/migrate/tests/src/Unit/RowTest.php index 9a20bda..96dd8cf 100644 --- a/core/modules/migrate/tests/src/Unit/RowTest.php +++ b/core/modules/migrate/tests/src/Unit/RowTest.php @@ -260,15 +260,38 @@ public function testMultipleDestination() { $row->setDestinationProperty('image/alt', 'alt text'); $row->setDestinationProperty('image/fid', 3); + $row->setDestinationProperty('body/value', [ + 'Body 1', + 'Body 2', + ]); + $row->setDestinationProperty('body/format', [ + 'basic_html', + 'full_html', + ]); + $row->setDestinationProperty('body/summary', [ + 'Summary 1', + 'Summary 2', + ]); + $this->assertTrue($row->hasDestinationProperty('image')); $this->assertFalse($row->hasDestinationProperty('alt')); $this->assertFalse($row->hasDestinationProperty('fid')); + $this->assertTrue($row->hasDestinationProperty('body')); + $this->assertFalse($row->hasDestinationProperty('value')); + $this->assertFalse($row->hasDestinationProperty('format')); + $this->assertFalse($row->hasDestinationProperty('summary')); + $destination = $row->getDestination(); $this->assertEquals('alt text', $destination['image']['alt']); $this->assertEquals(3, $destination['image']['fid']); $this->assertEquals('alt text', $row->getDestinationProperty('image/alt')); $this->assertEquals(3, $row->getDestinationProperty('image/fid')); + + $this->assertEquals('Body 1', $destination['body'][0]['value']); + $this->assertEquals('full_html', $destination['body'][1]['format']); + $this->assertEquals(['Summary 1', 'Summary 2'], $row->getDestinationProperty('body/summary')); + $this->assertEquals(['basic_html', 'full_html'], $row->getDestinationProperty('body/format')); } }