public function MigrateCommentTypeTest::testMigration in Zircon Profile 8.0
Same name and namespace in other branches
- 8 core/modules/comment/src/Tests/Migrate/d7/MigrateCommentTypeTest.php \Drupal\comment\Tests\Migrate\d7\MigrateCommentTypeTest::testMigration()
Tests the migrated comment types.
File
- core/
modules/ comment/ src/ Tests/ Migrate/ d7/ MigrateCommentTypeTest.php, line 55 - Contains \Drupal\comment\Tests\Migrate\d7\MigrateCommentTypeTest.
Class
- MigrateCommentTypeTest
- Tests migration of comment types from Drupal 7.
Namespace
Drupal\comment\Tests\Migrate\d7Code
public function testMigration() {
$this
->assertEntity('comment_node_page', 'Basic page comment');
$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_node_forum', 'Forum topic comment');
$this
->assertEntity('comment_node_test_content_type', 'Test content type comment');
// Validate that the source count and processed count match up.
/** @var \Drupal\migrate\Entity\MigrationInterface $migration */
$migration = Migration::load('d7_comment_type');
$this
->assertIdentical($migration
->getSourcePlugin()
->count(), $migration
->getIdMap()
->processedCount());
}