You are here

protected function FieldInstanceWidgetSettingsTest::assertEntity in Commerce Migrate 3.1.x

Same name and namespace in other branches
  1. 8.2 modules/commerce/tests/src/Kernel/Migrate/commerce1/FieldInstanceWidgetSettingsTest.php \Drupal\Tests\commerce_migrate_commerce\Kernel\Migrate\commerce1\FieldInstanceWidgetSettingsTest::assertEntity()
  2. 3.0.x modules/commerce/tests/src/Kernel/Migrate/commerce1/FieldInstanceWidgetSettingsTest.php \Drupal\Tests\commerce_migrate_commerce\Kernel\Migrate\commerce1\FieldInstanceWidgetSettingsTest::assertEntity()

Asserts various aspects of a form display entity.

Parameters

string $id: The entity ID.

string $expected_entity_type: The expected entity type to which the display settings are attached.

string $expected_bundle: The expected bundle to which the display settings are attached.

1 call to FieldInstanceWidgetSettingsTest::assertEntity()
FieldInstanceWidgetSettingsTest::testWidgetSettings in modules/commerce/tests/src/Kernel/Migrate/commerce1/FieldInstanceWidgetSettingsTest.php
Test that migrated view modes can be loaded using D8 APIs.

File

modules/commerce/tests/src/Kernel/Migrate/commerce1/FieldInstanceWidgetSettingsTest.php, line 79

Class

FieldInstanceWidgetSettingsTest
Tests field instance widget settings migration.

Namespace

Drupal\Tests\commerce_migrate_commerce\Kernel\Migrate\commerce1

Code

protected function assertEntity($id, $expected_entity_type, $expected_bundle) {

  /** @var \Drupal\Core\Entity\Display\EntityFormDisplayInterface $entity */
  $entity = EntityFormDisplay::load($id);
  $this
    ->assertInstanceOf(EntityFormDisplayInterface::class, $entity);
  $this
    ->assertSame($expected_entity_type, $entity
    ->getTargetEntityTypeId());
  $this
    ->assertSame($expected_bundle, $entity
    ->getTargetBundle());
}