function EntityTestBase::setUp

Same name 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()
  2. 8.9.x core/modules/migrate/tests/src/Unit/Plugin/migrate/destination/EntityTestBase.php \Drupal\Tests\migrate\Unit\Plugin\migrate\destination\EntityTestBase::setUp()
  3. 10 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 41

Class

EntityTestBase
Base test class for entity migration 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
        ->getPluralLabel()
        ->willReturn('foo');
    $this->storage
        ->getEntityType()
        ->willReturn($this->entityType
        ->reveal());
    $this->storage
        ->getEntityTypeId()
        ->willReturn('foo');
    $this->entityFieldManager = $this->prophesize(EntityFieldManagerInterface::class);
}

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