You are here

public function LinkFieldTest::testAlterFieldInstanceMigration in Drupal 9

Same name and namespace in other branches
  1. 8 core/modules/link/tests/src/Kernel/Plugin/migrate/field/d7/LinkFieldTest.php \Drupal\Tests\link\Kernel\Plugin\migrate\field\d7\LinkFieldTest::testAlterFieldInstanceMigration()
  2. 10 core/modules/link/tests/src/Kernel/Plugin/migrate/field/d7/LinkFieldTest.php \Drupal\Tests\link\Kernel\Plugin\migrate\field\d7\LinkFieldTest::testAlterFieldInstanceMigration()

@covers ::alterFieldInstanceMigration

File

core/modules/link/tests/src/Kernel/Plugin/migrate/field/d7/LinkFieldTest.php, line 56

Class

LinkFieldTest
@coversDefaultClass \Drupal\link\Plugin\migrate\field\d7\LinkField @group link

Namespace

Drupal\Tests\link\Kernel\Plugin\migrate\field\d7

Code

public function testAlterFieldInstanceMigration($method = 'alterFieldInstanceMigration') {
  $this->plugin
    ->{$method}($this->migration);
  $expected = [
    'plugin' => 'static_map',
    'source' => 'settings/title',
    'bypass' => TRUE,
    'map' => [
      'disabled' => DRUPAL_DISABLED,
      'optional' => DRUPAL_OPTIONAL,
      'required' => DRUPAL_REQUIRED,
    ],
  ];
  $this
    ->assertSame($expected, $this->migration
    ->getProcess());
}