function NodeReferenceFieldTest::setUp

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

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