function EntityRevisionTest::setUp

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

File

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

Class

EntityRevisionTest
Tests entity revision destination.

Namespace

Drupal\Tests\migrate\Unit\destination

Code

protected function setUp() : void {
    parent::setUp();
    // Setup mocks to be used when creating a revision destination.
    $this->migration = $this->prophesize(MigrationInterface::class);
    $this->storage = $this->prophesize('\\Drupal\\Core\\Entity\\EntityStorageInterface');
    $entity_type = $this->prophesize(EntityTypeInterface::class);
    $entity_type->getSingularLabel()
        ->willReturn('crazy');
    $entity_type->getPluralLabel()
        ->willReturn('craziness');
    $this->storage
        ->getEntityType()
        ->willReturn($entity_type->reveal());
    $this->entityFieldManager = $this->prophesize('\\Drupal\\Core\\Entity\\EntityFieldManagerInterface');
    $this->fieldTypeManager = $this->prophesize('\\Drupal\\Core\\Field\\FieldTypePluginManagerInterface');
    $this->accountSwitcher = $this->prophesize(AccountSwitcherInterface::class);
}

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