You are here

public function MigrateCommentFieldInstanceTest::testMigration in Zircon Profile 8

Same name and namespace in other branches
  1. 8.0 core/modules/comment/src/Tests/Migrate/d7/MigrateCommentFieldInstanceTest.php \Drupal\comment\Tests\Migrate\d7\MigrateCommentFieldInstanceTest::testMigration()

Tests the migrated fields.

File

core/modules/comment/src/Tests/Migrate/d7/MigrateCommentFieldInstanceTest.php, line 82
Contains \Drupal\comment\Tests\Migrate\d7\MigrateCommentFieldInstanceTest.

Class

MigrateCommentFieldInstanceTest
Tests creation of comment reference fields for each comment type defined in Drupal 7.

Namespace

Drupal\comment\Tests\Migrate\d7

Code

public function testMigration() {
  $this
    ->assertEntity('node.page.comment_node_page', 'comment_node_page', 'page', TRUE, 50, FALSE, CommentItemInterface::FORM_BELOW, TRUE);
  $this
    ->assertEntity('node.article.comment_node_article', 'comment_node_article', 'article', TRUE, 50, FALSE, CommentItemInterface::FORM_BELOW, TRUE);
  $this
    ->assertEntity('node.blog.comment_node_blog', 'comment_node_blog', 'blog', TRUE, 50, FALSE, CommentItemInterface::FORM_BELOW, TRUE);
  $this
    ->assertEntity('node.book.comment_node_book', 'comment_node_book', 'book', TRUE, 50, FALSE, CommentItemInterface::FORM_BELOW, TRUE);
  $this
    ->assertEntity('node.forum.comment_node_forum', 'comment_node_forum', 'forum', TRUE, 50, FALSE, CommentItemInterface::FORM_BELOW, TRUE);
  $this
    ->assertEntity('node.test_content_type.comment_node_test_content_type', 'comment_node_test_content_type', 'test_content_type', TRUE, 30, FALSE, CommentItemInterface::FORM_BELOW, TRUE);
}