function MigrateCommentTypeTest::testMigration
Same name in this branch
- 8.9.x core/modules/comment/tests/src/Kernel/Migrate/d6/MigrateCommentTypeTest.php \Drupal\Tests\comment\Kernel\Migrate\d6\MigrateCommentTypeTest::testMigration()
Same name in other branches
- 9 core/modules/comment/tests/src/Kernel/Migrate/d6/MigrateCommentTypeTest.php \Drupal\Tests\comment\Kernel\Migrate\d6\MigrateCommentTypeTest::testMigration()
- 9 core/modules/comment/tests/src/Kernel/Migrate/d7/MigrateCommentTypeTest.php \Drupal\Tests\comment\Kernel\Migrate\d7\MigrateCommentTypeTest::testMigration()
- 10 core/modules/comment/tests/src/Kernel/Migrate/d6/MigrateCommentTypeTest.php \Drupal\Tests\comment\Kernel\Migrate\d6\MigrateCommentTypeTest::testMigration()
- 10 core/modules/comment/tests/src/Kernel/Migrate/d7/MigrateCommentTypeTest.php \Drupal\Tests\comment\Kernel\Migrate\d7\MigrateCommentTypeTest::testMigration()
- 11.x core/modules/comment/tests/src/Kernel/Migrate/d6/MigrateCommentTypeTest.php \Drupal\Tests\comment\Kernel\Migrate\d6\MigrateCommentTypeTest::testMigration()
- 11.x core/modules/comment/tests/src/Kernel/Migrate/d7/MigrateCommentTypeTest.php \Drupal\Tests\comment\Kernel\Migrate\d7\MigrateCommentTypeTest::testMigration()
Tests the migrated comment types.
File
-
core/
modules/ comment/ tests/ src/ Kernel/ Migrate/ d7/ MigrateCommentTypeTest.php, line 47
Class
- MigrateCommentTypeTest
- Tests the migration of comment types from Drupal 7.
Namespace
Drupal\Tests\comment\Kernel\Migrate\d7Code
public function testMigration() {
$comment_fields = [
'comment' => 'Default comment setting',
'comment_default_mode' => 'Default display mode',
'comment_default_per_page' => 'Default comments per page',
'comment_anonymous' => 'Anonymous commenting',
'comment_subject_field' => 'Comment subject field',
'comment_preview' => 'Preview comment',
'comment_form_location' => 'Location of comment submission form',
];
$this->assertArraySubset($comment_fields, $this->migration
->getSourcePlugin()
->fields());
$this->assertEntity('comment_node_article', 'Article comment');
$this->assertEntity('comment_node_blog', 'Blog entry comment');
$this->assertEntity('comment_node_book', 'Book page comment');
$this->assertEntity('comment_forum', 'Forum topic comment');
$this->assertEntity('comment_node_page', 'Basic page comment');
$this->assertEntity('comment_node_test_content_type', 'Test content type comment');
}
Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.