diff -u b/core/modules/link/src/Plugin/migrate/cckfield/LinkField.php b/core/modules/link/src/Plugin/migrate/cckfield/LinkField.php --- b/core/modules/link/src/Plugin/migrate/cckfield/LinkField.php +++ b/core/modules/link/src/Plugin/migrate/cckfield/LinkField.php @@ -17,6 +17,9 @@ * "link_field" = "link" * } * ) + * + * @deprecated in Drupal 8.4.x and will be removed in Drupal 9.0.x. Use + * \Drupal\link\Plugin\migrate\field\d7\FileField instead. */ class LinkField extends CckFieldPluginBase { diff -u b/core/modules/link/tests/src/Unit/Plugin/migrate/cckfield/LinkCckTest.php b/core/modules/link/tests/src/Unit/Plugin/migrate/cckfield/LinkCckTest.php --- b/core/modules/link/tests/src/Unit/Plugin/migrate/cckfield/LinkCckTest.php +++ b/core/modules/link/tests/src/Unit/Plugin/migrate/cckfield/LinkCckTest.php @@ -10,6 +10,7 @@ /** * @coversDefaultClass \Drupal\link\Plugin\migrate\cckfield\LinkField * @group link + * @group legacy */ class LinkCckTest extends UnitTestCase { reverted: --- b/core/modules/link/tests/src/Unit/Plugin/migrate/cckfield/d7/LinkCckTest.php +++ /dev/null @@ -1,65 +0,0 @@ -plugin = new LinkField([], 'link', []); - - $migration = $this->prophesize(MigrationInterface::class); - - // The plugin's processFieldInstance() method will call - // mergeProcessOfProperty() and return nothing. So, in order to examine the - // process pipeline created by the plugin, we need to ensure that - // getProcess() always returns the last input to mergeProcessOfProperty(). - $migration->mergeProcessOfProperty(Argument::type('string'), Argument::type('array')) - ->will(function($arguments) use ($migration) { - $migration->getProcess()->willReturn($arguments[1]); - }); - - $this->migration = $migration->reveal(); - } - - /** - * @covers ::processFieldInstance - */ - public function testProcessFieldInstance() { - $this->plugin->processFieldInstance($this->migration); - - $expected = [ - 'plugin' => 'static_map', - 'source' => 'instance_settings/title', - 'bypass' => TRUE, - 'map' => [ - 'disabled' => DRUPAL_DISABLED, - 'optional' => DRUPAL_OPTIONAL, - 'required' => DRUPAL_REQUIRED, - ], - ]; - $this->assertSame($expected, $this->migration->getProcess()); - } - -} reverted: --- b/core/modules/link/tests/src/Unit/Plugin/migrate/field/d7/LinkFieldTest.php +++ /dev/null @@ -1,65 +0,0 @@ -plugin = new LinkField([], 'link', []); - - $migration = $this->prophesize(MigrationInterface::class); - - // The plugin's ProcessFieldInstance() method will call - // mergeProcessOfProperty() and return nothing. So, in order to examine the - // process pipeline created by the plugin, we need to ensure that - // getProcess() always returns the last input to mergeProcessOfProperty(). - $migration->mergeProcessOfProperty(Argument::type('string'), Argument::type('array')) - ->will(function($arguments) use ($migration) { - $migration->getProcess()->willReturn($arguments[1]); - }); - - $this->migration = $migration->reveal(); - } - - /** - * @covers ::processFieldInstance - */ - public function testProcessFieldInstance() { - $this->plugin->processFieldInstance($this->migration); - - $expected = [ - 'plugin' => 'static_map', - 'source' => 'instance_settings/title', - 'bypass' => TRUE, - 'map' => [ - 'disabled' => DRUPAL_DISABLED, - 'optional' => DRUPAL_OPTIONAL, - 'required' => DRUPAL_REQUIRED, - ], - ]; - $this->assertSame($expected, $this->migration->getProcess()); - } - -}