function EntityRevisionTest::setUp

Same name in this branch
  1. 10 core/modules/migrate/tests/src/Unit/destination/EntityRevisionTest.php \Drupal\Tests\migrate\Unit\destination\EntityRevisionTest::setUp()
  2. 10 core/modules/migrate/tests/src/Kernel/Plugin/EntityRevisionTest.php \Drupal\Tests\migrate\Kernel\Plugin\EntityRevisionTest::setUp()
Same name in other branches
  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/Unit/Plugin/migrate/destination/EntityRevisionTest.php \Drupal\Tests\migrate\Unit\Plugin\migrate\destination\EntityRevisionTest::setUp()
  3. 9 core/modules/migrate/tests/src/Kernel/Plugin/EntityRevisionTest.php \Drupal\Tests\migrate\Kernel\Plugin\EntityRevisionTest::setUp()
  4. 8.9.x core/modules/migrate/tests/src/Unit/destination/EntityRevisionTest.php \Drupal\Tests\migrate\Unit\destination\EntityRevisionTest::setUp()
  5. 8.9.x core/modules/migrate/tests/src/Unit/Plugin/migrate/destination/EntityRevisionTest.php \Drupal\Tests\migrate\Unit\Plugin\migrate\destination\EntityRevisionTest::setUp()
  6. 8.9.x core/modules/migrate/tests/src/Kernel/Plugin/EntityRevisionTest.php \Drupal\Tests\migrate\Kernel\Plugin\EntityRevisionTest::setUp()
  7. 11.x core/modules/migrate/tests/src/Unit/destination/EntityRevisionTest.php \Drupal\Tests\migrate\Unit\destination\EntityRevisionTest::setUp()
  8. 11.x core/modules/migrate/tests/src/Unit/Plugin/migrate/destination/EntityRevisionTest.php \Drupal\Tests\migrate\Unit\Plugin\migrate\destination\EntityRevisionTest::setUp()
  9. 11.x core/modules/migrate/tests/src/Kernel/Plugin/EntityRevisionTest.php \Drupal\Tests\migrate\Kernel\Plugin\EntityRevisionTest::setUp()

Overrides EntityTestBase::setUp

File

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

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');
}

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