protected function ViewModesTest::assertEntity in Commerce Migrate 3.0.x
Same name in this branch
- 3.0.x modules/ubercart/tests/src/Kernel/Migrate/uc7/ViewModesTest.php \Drupal\Tests\commerce_migrate_ubercart\Kernel\Migrate\uc7\ViewModesTest::assertEntity()
- 3.0.x modules/ubercart/tests/src/Kernel/Migrate/uc6/ViewModesTest.php \Drupal\Tests\commerce_migrate_ubercart\Kernel\Migrate\uc6\ViewModesTest::assertEntity()
- 3.0.x modules/commerce/tests/src/Kernel/Migrate/commerce1/ViewModesTest.php \Drupal\Tests\commerce_migrate_commerce\Kernel\Migrate\commerce1\ViewModesTest::assertEntity()
Same name and namespace in other branches
- 8.2 modules/ubercart/tests/src/Kernel/Migrate/uc7/ViewModesTest.php \Drupal\Tests\commerce_migrate_ubercart\Kernel\Migrate\uc7\ViewModesTest::assertEntity()
- 3.1.x modules/ubercart/tests/src/Kernel/Migrate/uc7/ViewModesTest.php \Drupal\Tests\commerce_migrate_ubercart\Kernel\Migrate\uc7\ViewModesTest::assertEntity()
Asserts various aspects of a view mode entity.
Parameters
string $id: The entity ID.
string $label: The expected label of the view mode.
string $entity_type: The expected entity type ID which owns the view mode.
1 call to ViewModesTest::assertEntity()
- ViewModesTest::testMigration in modules/
ubercart/ tests/ src/ Kernel/ Migrate/ uc7/ ViewModesTest.php - Tests migration of D6 view mode to node and commerce_product entities.
File
- modules/
ubercart/ tests/ src/ Kernel/ Migrate/ uc7/ ViewModesTest.php, line 52
Class
- ViewModesTest
- Tests migration of Ubercart 7 view modes.
Namespace
Drupal\Tests\commerce_migrate_ubercart\Kernel\Migrate\uc7Code
protected function assertEntity($id, $label, $entity_type) {
/** @var \Drupal\Core\Entity\EntityViewModeInterface $view_mode */
$view_mode = EntityViewMode::load($id);
$this
->assertInstanceOf(EntityViewModeInterface::class, $view_mode);
$this
->assertSame($label, $view_mode
->label());
$this
->assertSame($entity_type, $view_mode
->getTargetType());
}