You are here

protected function EntityTestBase::setUp in Drupal 8

Same name and namespace in other branches
  1. 9 core/modules/migrate/tests/src/Unit/Plugin/migrate/destination/EntityTestBase.php \Drupal\Tests\migrate\Unit\Plugin\migrate\destination\EntityTestBase::setUp()

Overrides UnitTestCase::setUp

1 call to EntityTestBase::setUp()
EntityRevisionTest::setUp in core/modules/migrate/tests/src/Unit/Plugin/migrate/destination/EntityRevisionTest.php
1 method overrides EntityTestBase::setUp()
EntityRevisionTest::setUp in core/modules/migrate/tests/src/Unit/Plugin/migrate/destination/EntityRevisionTest.php

File

core/modules/migrate/tests/src/Unit/Plugin/migrate/destination/EntityTestBase.php, line 44
Contains \Drupal\Tests\migrate\Unit\Plugin\migrate\destination\EntityTestBase

Class

EntityTestBase
Base test class forentity migration destination functionality.

Namespace

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

Code

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