function ProcessFieldTest::setUp

Same name and namespace in other branches
  1. 9 core/modules/field/tests/src/Unit/Plugin/migrate/process/ProcessFieldTest.php \Drupal\Tests\field\Unit\Plugin\migrate\process\ProcessFieldTest::setUp()
  2. 8.9.x core/modules/field/tests/src/Unit/Plugin/migrate/process/ProcessFieldTest.php \Drupal\Tests\field\Unit\Plugin\migrate\process\ProcessFieldTest::setUp()
  3. 10 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 54

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

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