function EntityRevisionTest::testGetEntityDestinationValues
Same name in other branches
- 9 core/modules/migrate/tests/src/Unit/destination/EntityRevisionTest.php \Drupal\Tests\migrate\Unit\destination\EntityRevisionTest::testGetEntityDestinationValues()
- 10 core/modules/migrate/tests/src/Unit/destination/EntityRevisionTest.php \Drupal\Tests\migrate\Unit\destination\EntityRevisionTest::testGetEntityDestinationValues()
- 11.x core/modules/migrate/tests/src/Unit/destination/EntityRevisionTest.php \Drupal\Tests\migrate\Unit\destination\EntityRevisionTest::testGetEntityDestinationValues()
Test that passed old destination values are used by default.
@covers ::getEntity
File
-
core/
modules/ migrate/ tests/ src/ Unit/ destination/ EntityRevisionTest.php, line 67
Class
- EntityRevisionTest
- Tests entity revision destination.
Namespace
Drupal\Tests\migrate\Unit\destinationCode
public function testGetEntityDestinationValues() {
$destination = $this->getEntityRevisionDestination([]);
// Return a dummy because we don't care what gets called.
$entity = $this->prophesize('\\Drupal\\Core\\Entity\\RevisionableInterface');
// Assert that the first ID from the destination values is used to load the
// entity.
$this->storage
->loadRevision(12)
->shouldBeCalled()
->willReturn($entity->reveal());
$row = new Row();
$this->assertEquals($entity->reveal(), $destination->getEntity($row, [
12,
13,
]));
}
Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.