function MigrateCommentFieldTest::assertEntity
Same name in this branch
- 11.x core/modules/comment/tests/src/Kernel/Migrate/d6/MigrateCommentFieldTest.php \Drupal\Tests\comment\Kernel\Migrate\d6\MigrateCommentFieldTest::assertEntity()
Same name in other branches
- 9 core/modules/comment/tests/src/Kernel/Migrate/d6/MigrateCommentFieldTest.php \Drupal\Tests\comment\Kernel\Migrate\d6\MigrateCommentFieldTest::assertEntity()
- 9 core/modules/comment/tests/src/Kernel/Migrate/d7/MigrateCommentFieldTest.php \Drupal\Tests\comment\Kernel\Migrate\d7\MigrateCommentFieldTest::assertEntity()
- 8.9.x core/modules/comment/tests/src/Kernel/Migrate/d6/MigrateCommentFieldTest.php \Drupal\Tests\comment\Kernel\Migrate\d6\MigrateCommentFieldTest::assertEntity()
- 8.9.x core/modules/comment/tests/src/Kernel/Migrate/d7/MigrateCommentFieldTest.php \Drupal\Tests\comment\Kernel\Migrate\d7\MigrateCommentFieldTest::assertEntity()
- 10 core/modules/comment/tests/src/Kernel/Migrate/d6/MigrateCommentFieldTest.php \Drupal\Tests\comment\Kernel\Migrate\d6\MigrateCommentFieldTest::assertEntity()
- 10 core/modules/comment/tests/src/Kernel/Migrate/d7/MigrateCommentFieldTest.php \Drupal\Tests\comment\Kernel\Migrate\d7\MigrateCommentFieldTest::assertEntity()
Asserts a comment field entity.
@internal
Parameters
string $comment_type: The comment type.
1 call to MigrateCommentFieldTest::assertEntity()
- MigrateCommentFieldTest::testMigration in core/
modules/ comment/ tests/ src/ Kernel/ Migrate/ d7/ MigrateCommentFieldTest.php - Tests the migrated comment fields.
File
-
core/
modules/ comment/ tests/ src/ Kernel/ Migrate/ d7/ MigrateCommentFieldTest.php, line 40
Class
- MigrateCommentFieldTest
- Tests the migration of comment fields from Drupal 7.
Namespace
Drupal\Tests\comment\Kernel\Migrate\d7Code
protected function assertEntity(string $comment_type) : void {
$entity = FieldStorageConfig::load('node.' . $comment_type);
$this->assertInstanceOf(FieldStorageConfig::class, $entity);
$this->assertSame('node', $entity->getTargetEntityTypeId());
$this->assertSame('comment', $entity->getType());
$this->assertSame($comment_type, $entity->getSetting('comment_type'));
}
Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.