function EntityRevision::updateEntity

Same name in other branches
  1. 9 core/modules/migrate/tests/src/Unit/destination/EntityRevisionTest.php \Drupal\Tests\migrate\Unit\destination\EntityRevision::updateEntity()
  2. 8.9.x core/modules/migrate/tests/src/Unit/destination/EntityRevisionTest.php \Drupal\Tests\migrate\Unit\destination\EntityRevision::updateEntity()
  3. 11.x core/modules/migrate/tests/src/Unit/destination/EntityRevisionTest.php \Drupal\Tests\migrate\Unit\destination\EntityRevision::updateEntity()

Don't test method from base class.

This method is from the parent and we aren't concerned with the inner workings of its implementation which would trickle into mock assertions. An empty implementation avoids this.

Parameters

\Drupal\Core\Entity\EntityInterface $entity: The entity to update.

\Drupal\migrate\Row $row: The row object to update from.

Return value

\Drupal\Core\Entity\EntityInterface An updated entity from row values.

Overrides EntityContentBase::updateEntity

File

core/modules/migrate/tests/src/Unit/destination/EntityRevisionTest.php, line 251

Class

EntityRevision
Mock that exposes from internal methods for testing.

Namespace

Drupal\Tests\migrate\Unit\destination

Code

protected function updateEntity(EntityInterface $entity, Row $row) {
    return $entity;
}

Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.