You are here

public function NodeReferenceFieldTest::testDefineValueProcessPipeline in Drupal 9

@covers ::defineValueProcessPipeline @runInSeparateProcess

File

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

Class

NodeReferenceFieldTest
Tests legacy NodeReference migrate field plugin.

Namespace

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

Code

public function testDefineValueProcessPipeline() {
  $this
    ->expectDeprecation('The Drupal\\migrate_drupal\\Plugin\\migrate\\field\\NodeReference is deprecated in drupal:9.1.0 and will be removed from drupal:10.0.0. Instead use \\Drupal\\migrate_drupal\\Plugin\\migrate\\field\\d6\\NodeReference. See https://www.drupal.org/node/3159537.');
  $this->plugin
    ->defineValueProcessPipeline($this->migration, 'somefieldname', []);
  $expected = [
    'plugin' => 'sub_process',
    'source' => 'somefieldname',
    'process' => [
      'target_id' => 'nid',
    ],
  ];
  $this
    ->assertSame($expected, $this->migration
    ->getProcess());
}