function LinkFieldTest::testAlterFieldInstanceMigration

Same name 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()
  3. 11.x 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());
}

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