You are here

protected function EntityRevisionTest::setUp in Drupal 9

Same name in this branch
  1. 9 core/modules/migrate/tests/src/Unit/destination/EntityRevisionTest.php \Drupal\Tests\migrate\Unit\destination\EntityRevisionTest::setUp()
  2. 9 core/modules/migrate/tests/src/Kernel/Plugin/EntityRevisionTest.php \Drupal\Tests\migrate\Kernel\Plugin\EntityRevisionTest::setUp()
  3. 9 core/modules/migrate/tests/src/Unit/Plugin/migrate/destination/EntityRevisionTest.php \Drupal\Tests\migrate\Unit\Plugin\migrate\destination\EntityRevisionTest::setUp()
Same name and namespace in other branches
  1. 8 core/modules/migrate/tests/src/Unit/Plugin/migrate/destination/EntityRevisionTest.php \Drupal\Tests\migrate\Unit\Plugin\migrate\destination\EntityRevisionTest::setUp()
  2. 10 core/modules/migrate/tests/src/Unit/Plugin/migrate/destination/EntityRevisionTest.php \Drupal\Tests\migrate\Unit\Plugin\migrate\destination\EntityRevisionTest::setUp()

Overrides EntityTestBase::setUp

File

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

Class

EntityRevisionTest
Tests entity revision destination functionality.

Namespace

Drupal\Tests\migrate\Unit\Plugin\migrate\destination

Code

protected function setUp() : void {
  parent::setUp();
  $this->migration = $this
    ->prophesize(MigrationInterface::class);
  $this->storage = $this
    ->prophesize(EntityStorageInterface::class);
  $this->entityType = $this
    ->prophesize(EntityTypeInterface::class);
  $this->entityType
    ->getSingularLabel()
    ->willReturn('foo');
  $this->entityType
    ->getPluralLabel()
    ->willReturn('bar');
  $this->storage
    ->getEntityType()
    ->willReturn($this->entityType
    ->reveal());
  $this->storage
    ->getEntityTypeId()
    ->willReturn('foo');
}