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