function RowTest::testDestination
Tests setting and getting the destination.
File
-
core/
modules/ migrate/ tests/ src/ Unit/ RowTest.php, line 283
Class
- RowTest
- @coversDefaultClass \Drupal\migrate\Row[[api-linebreak]] @group migrate
Namespace
Drupal\Tests\migrate\UnitCode
public function testDestination() : void {
$row = new Row($this->testValues, $this->testSourceIds);
$this->assertEmpty($row->getDestination());
$this->assertFalse($row->hasDestinationProperty('nid'));
// Set a destination.
$row->setDestinationProperty('nid', 2);
$this->assertTrue($row->hasDestinationProperty('nid'));
$this->assertEquals([
'nid' => 2,
], $row->getDestination());
}
Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.