You are here

public function MigrateCommentTypeTest::testMigration in Drupal 9

Same name in this branch
  1. 9 core/modules/comment/tests/src/Kernel/Migrate/d6/MigrateCommentTypeTest.php \Drupal\Tests\comment\Kernel\Migrate\d6\MigrateCommentTypeTest::testMigration()
  2. 9 core/modules/comment/tests/src/Kernel/Migrate/d7/MigrateCommentTypeTest.php \Drupal\Tests\comment\Kernel\Migrate\d7\MigrateCommentTypeTest::testMigration()
Same name and namespace in other branches
  1. 8 core/modules/comment/tests/src/Kernel/Migrate/d6/MigrateCommentTypeTest.php \Drupal\Tests\comment\Kernel\Migrate\d6\MigrateCommentTypeTest::testMigration()
  2. 10 core/modules/comment/tests/src/Kernel/Migrate/d6/MigrateCommentTypeTest.php \Drupal\Tests\comment\Kernel\Migrate\d6\MigrateCommentTypeTest::testMigration()

Tests the migrated comment types.

File

core/modules/comment/tests/src/Kernel/Migrate/d6/MigrateCommentTypeTest.php, line 39

Class

MigrateCommentTypeTest
Tests the migration of comment types from Drupal 6.

Namespace

Drupal\Tests\comment\Kernel\Migrate\d6

Code

public function testMigration() {
  $this
    ->installConfig([
    'comment',
  ]);
  $this
    ->executeMigration('d6_comment_type');
  $this
    ->assertEntity('comment_node_article', 'Article comment');
  $this
    ->assertEntity('comment_node_company', 'Company comment');
  $this
    ->assertEntity('comment_node_employee', 'Employee comment');
  $this
    ->assertEntity('comment_node_event', 'Event comment');
  $this
    ->assertEntity('comment_forum', 'Forum topic comment');
  $this
    ->assertEntity('comment_node_page', 'Page comment');
  $this
    ->assertEntity('comment_node_sponsor', 'Sponsor comment');
  $this
    ->assertEntity('comment_node_story', 'Story comment');
  $this
    ->assertEntity('comment_node_test_event', 'Migrate test event comment');
  $this
    ->assertEntity('comment_node_test_page', 'Migrate test page comment');
  $this
    ->assertEntity('comment_node_test_planet', 'Migrate test planet comment');
  $this
    ->assertEntity('comment_node_test_story', 'Migrate test story comment');
  $this
    ->assertEntity('comment_node_a_thirty_two_char', 'Test long name comment');
}