protected function MigrateCommentTypeTest::assertEntity in Drupal 9
Same name in this branch
- 9 core/modules/comment/tests/src/Kernel/Migrate/d6/MigrateCommentTypeTest.php \Drupal\Tests\comment\Kernel\Migrate\d6\MigrateCommentTypeTest::assertEntity()
- 9 core/modules/comment/tests/src/Kernel/Migrate/d7/MigrateCommentTypeTest.php \Drupal\Tests\comment\Kernel\Migrate\d7\MigrateCommentTypeTest::assertEntity()
Same name and namespace in other branches
- 8 core/modules/comment/tests/src/Kernel/Migrate/d7/MigrateCommentTypeTest.php \Drupal\Tests\comment\Kernel\Migrate\d7\MigrateCommentTypeTest::assertEntity()
- 10 core/modules/comment/tests/src/Kernel/Migrate/d7/MigrateCommentTypeTest.php \Drupal\Tests\comment\Kernel\Migrate\d7\MigrateCommentTypeTest::assertEntity()
Asserts a comment type entity.
Parameters
string $id: The entity ID.
string $label: The entity label.
1 call to MigrateCommentTypeTest::assertEntity()
- MigrateCommentTypeTest::testMigration in core/
modules/ comment/ tests/ src/ Kernel/ Migrate/ d7/ MigrateCommentTypeTest.php - Tests the migrated comment types.
File
- core/
modules/ comment/ tests/ src/ Kernel/ Migrate/ d7/ MigrateCommentTypeTest.php, line 29
Class
- MigrateCommentTypeTest
- Tests the migration of comment types from Drupal 7.
Namespace
Drupal\Tests\comment\Kernel\Migrate\d7Code
protected function assertEntity($id, $label) {
$entity = CommentType::load($id);
$this
->assertInstanceOf(CommentType::class, $entity);
$this
->assertSame($label, $entity
->label());
$this
->assertSame('node', $entity
->getTargetEntityTypeId());
}