$this->entityFieldManager =
$this->
prophesize('\Drupal\Core\Entity\EntityFieldManagerInterface'
);
$this->fieldTypeManager =
$this->
prophesize('\Drupal\Core\Field\FieldTypePluginManagerInterface'
);
$this->accountSwitcher =
$this->
prophesize(AccountSwitcherInterface::
class);
} /**
* Tests that passed old destination values are used by default.
*
* @covers ::getEntity
*/
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
]));
}