protected function CommentFieldTest::assertEntity in Commerce Migrate 8.2
Same name and namespace in other branches
- 3.1.x modules/ubercart/tests/src/Kernel/Migrate/uc7/CommentFieldTest.php \Drupal\Tests\commerce_migrate_ubercart\Kernel\Migrate\uc7\CommentFieldTest::assertEntity()
- 3.0.x modules/ubercart/tests/src/Kernel/Migrate/uc7/CommentFieldTest.php \Drupal\Tests\commerce_migrate_ubercart\Kernel\Migrate\uc7\CommentFieldTest::assertEntity()
Asserts a comment field entity.
Parameters
string $comment_type: The comment type.
1 call to CommentFieldTest::assertEntity()
- CommentFieldTest::testMigration in modules/
ubercart/ tests/ src/ Kernel/ Migrate/ uc7/ CommentFieldTest.php - Tests the migrated comment fields.
File
- modules/
ubercart/ tests/ src/ Kernel/ Migrate/ uc7/ CommentFieldTest.php, line 48
Class
- CommentFieldTest
- Tests the migration of product comment fields from Ubercart 7.
Namespace
Drupal\Tests\commerce_migrate_ubercart\Kernel\Migrate\uc7Code
protected function assertEntity($comment_type) {
$entity = FieldStorageConfig::load('commerce_product.' . $comment_type);
$this
->assertInstanceOf(FieldStorageConfig::class, $entity);
$this
->assertSame('commerce_product', $entity
->getTargetEntityTypeId());
$this
->assertSame('comment', $entity
->getType());
$this
->assertSame($comment_type, $entity
->getSetting('comment_type'));
}