You are here

public function LinkFieldTest::testAlterFieldInstanceMigration in Drupal 8

Same name and namespace in other branches
  1. 9 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

1 call to LinkFieldTest::testAlterFieldInstanceMigration()
LinkFieldLegacyTest::testAlterFieldInstanceMigration in core/modules/link/tests/src/Kernel/Plugin/migrate/field/d7/LinkFieldLegacyTest.php
@expectedDeprecation Deprecated in Drupal 8.6.0, to be removed before Drupal 9.0.0. Use alterFieldInstanceMigration() instead. See https://www.drupal.org/node/2944598.
1 method overrides LinkFieldTest::testAlterFieldInstanceMigration()
LinkFieldLegacyTest::testAlterFieldInstanceMigration in core/modules/link/tests/src/Kernel/Plugin/migrate/field/d7/LinkFieldLegacyTest.php
@expectedDeprecation Deprecated in Drupal 8.6.0, to be removed before Drupal 9.0.0. Use alterFieldInstanceMigration() instead. See https://www.drupal.org/node/2944598.

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