function MigrateCommentTypeTest::assertEntity
Same name in this branch
- 11.x core/modules/comment/tests/src/Kernel/Migrate/d7/MigrateCommentTypeTest.php \Drupal\Tests\comment\Kernel\Migrate\d7\MigrateCommentTypeTest::assertEntity()
Same name in other branches
- 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()
- 8.9.x core/modules/comment/tests/src/Kernel/Migrate/d6/MigrateCommentTypeTest.php \Drupal\Tests\comment\Kernel\Migrate\d6\MigrateCommentTypeTest::assertEntity()
- 8.9.x 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/d6/MigrateCommentTypeTest.php \Drupal\Tests\comment\Kernel\Migrate\d6\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.
@internal
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/ d6/ MigrateCommentTypeTest.php - Tests the migrated comment types.
File
-
core/
modules/ comment/ tests/ src/ Kernel/ Migrate/ d6/ MigrateCommentTypeTest.php, line 33
Class
- MigrateCommentTypeTest
- Tests the migration of comment types from Drupal 6.
Namespace
Drupal\Tests\comment\Kernel\Migrate\d6Code
protected function assertEntity(string $id, string $label) : void {
$entity = CommentType::load($id);
$this->assertInstanceOf(CommentType::class, $entity);
$this->assertSame($label, $entity->label());
$this->assertSame('node', $entity->getTargetEntityTypeId());
}
Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.