You are here

protected function NodeReferenceFieldTest::setUp in Drupal 9

Overrides UnitTestCase::setUp

File

core/modules/migrate_drupal/tests/src/Unit/Plugin/migrate/field/d6/NodeReferenceFieldTest.php, line 36

Class

NodeReferenceFieldTest
Tests legacy NodeReference migrate field plugin.

Namespace

Drupal\Tests\migrate_drupal\Unit\Plugin\migrate\field\d6

Code

protected function setUp() : void {
  $this->plugin = new NodeReference([], 'nodereference', []);
  $migration = $this
    ->prophesize(MigrationInterface::class);
  $migration
    ->setProcessOfProperty(Argument::type('string'), Argument::type('array'))
    ->will(function ($arguments) use ($migration) {
    $migration
      ->getProcess()
      ->willReturn($arguments[1]);
  });
  $this->migration = $migration
    ->reveal();
}