You are here

protected function ProcessFieldTest::setUp in Drupal 9

Same name and namespace in other branches
  1. 8 core/modules/field/tests/src/Unit/Plugin/migrate/process/ProcessFieldTest.php \Drupal\Tests\field\Unit\Plugin\migrate\process\ProcessFieldTest::setUp()

Overrides UnitTestCase::setUp

File

core/modules/field/tests/src/Unit/Plugin/migrate/process/ProcessFieldTest.php, line 26

Class

ProcessFieldTest
Tests the ProcessField migrate process plugin.

Namespace

Drupal\Tests\field\Unit\Plugin\migrate\process

Code

protected function setUp() : void {
  $this->fieldManager = $this
    ->prophesize(MigrateFieldPluginManagerInterface::class);
  $this->fieldPlugin = $this
    ->prophesize(MigrateFieldInterface::class);
  $this->migrateExecutable = $this
    ->prophesize(MigrateExecutable::class);
  $this->migration = $this
    ->prophesize(MigrationInterface::class);
  $this->row = $this
    ->prophesize(Row::class);
  $this->fieldManager
    ->getPluginIdFromFieldType('foo', [], $this->migration
    ->reveal())
    ->willReturn('foo');
  $this->fieldManager
    ->createInstance('foo', [], $this->migration
    ->reveal())
    ->willReturn($this->fieldPlugin);
  parent::setUp();
}