You are here

protected function EntityRevisionTest::getEntityRevisionDestination in Zircon Profile 8

Same name and namespace in other branches
  1. 8.0 core/modules/migrate/tests/src/Unit/destination/EntityRevisionTest.php \Drupal\Tests\migrate\Unit\destination\EntityRevisionTest::getEntityRevisionDestination()

Helper method to create an entity revision destination with mock services.

Parameters

$configuration: Configuration for the destination.

string $plugin_id: The plugin id.

array $plugin_definition: The plugin definition.

Return value

\Drupal\Tests\migrate\Unit\destination\EntityRevision Mocked destination.

See also

\Drupal\Tests\migrate\Unit\Destination\EntityRevision

5 calls to EntityRevisionTest::getEntityRevisionDestination()
EntityRevisionTest::testGetEntityDestinationValues in core/modules/migrate/tests/src/Unit/destination/EntityRevisionTest.php
Test that passed old destination values are used by default.
EntityRevisionTest::testGetEntityLoadFailure in core/modules/migrate/tests/src/Unit/destination/EntityRevisionTest.php
Test entity load failure.
EntityRevisionTest::testGetEntityNewRevision in core/modules/migrate/tests/src/Unit/destination/EntityRevisionTest.php
Test that new revisions are flagged to be written as new.
EntityRevisionTest::testGetEntityUpdateRevision in core/modules/migrate/tests/src/Unit/destination/EntityRevisionTest.php
Test that revision updates update.
EntityRevisionTest::testSave in core/modules/migrate/tests/src/Unit/destination/EntityRevisionTest.php
Test entity revision save.

File

core/modules/migrate/tests/src/Unit/destination/EntityRevisionTest.php, line 187
Contains \Drupal\Tests\migrate\Unit\destination\EntityRevisionTest.

Class

EntityRevisionTest
Tests entity revision destination.

Namespace

Drupal\Tests\migrate\Unit\destination

Code

protected function getEntityRevisionDestination(array $configuration = [], $plugin_id = 'entity_revision', array $plugin_definition = []) {
  return new EntityRevision($configuration, $plugin_id, $plugin_definition, $this->migration
    ->reveal(), $this->storage
    ->reveal(), [], $this->entityManager
    ->reveal(), $this->fieldTypeManager
    ->reveal());
}