diff --git a/core/modules/migrate/src/Plugin/migrate/destination/EntityComment.php b/core/modules/migrate/src/Plugin/migrate/destination/EntityComment.php index 26e4f3d..981b54e 100644 --- a/core/modules/migrate/src/Plugin/migrate/destination/EntityComment.php +++ b/core/modules/migrate/src/Plugin/migrate/destination/EntityComment.php @@ -44,13 +44,6 @@ class EntityComment extends EntityContentBase { protected $stubCommentedEntityType; /** - * The comment type used for 'comment_type' in stub rows. - * - * @var string - */ - protected $stubCommentedCommentType; - - /** * Builds an comment entity destination. * * @param array $configuration @@ -123,9 +116,6 @@ protected function getEntity(Row $row, array $old_destination_id_values) { $this->stubCommentedEntityId = $result[0]['nid_min']; $this->stubCommentedEntityType = 'node'; } - // Add a stub comment_type. - $this->stubCommentedCommentType = 'comment'; - // Figure out a working } if (!empty($this->stubCommentedEntityId)) { $row->setDestinationProperty('entity_id', $this->stubCommentedEntityId); diff --git a/core/modules/migrate_drupal/src/Tests/d6/MigrateCommentTest.php b/core/modules/migrate_drupal/src/Tests/d6/MigrateCommentTest.php index 830beea..d861b67 100644 --- a/core/modules/migrate_drupal/src/Tests/d6/MigrateCommentTest.php +++ b/core/modules/migrate_drupal/src/Tests/d6/MigrateCommentTest.php @@ -54,12 +54,7 @@ protected function setUp() { 'd6_comment_entity_form_display' => array(array(array('story'), array('node', 'story', 'default', 'comment'))), ); $this->prepareMigrations($id_mappings); - } - /** - * Tests the Drupal 6 to Drupal 8 comment migration. - */ - public function testComments() { \Drupal::service('comment.manager')->addDefaultField('node', 'story'); /** @var \Drupal\migrate\entity\Migration $migration */ $migration = entity_load('migration', 'd6_comment'); @@ -72,7 +67,12 @@ public function testComments() { $this->prepare($migration, $dumps); $executable = new MigrateExecutable($migration, $this); $executable->import(); + } + /** + * Tests the Drupal 6 to Drupal 8 comment migration. + */ + public function testComments() { /** @var \Drupal\comment\CommentInterface $comment */ $comment = entity_load('comment', 1); $this->assertEqual('The first comment.', $comment->getSubject());