You are here

protected function MigrateFieldInstanceWidgetSettingsTest::assertEntity in Inline Entity Form 8

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 MigrateFieldInstanceWidgetSettingsTest::assertEntity()
MigrateFieldInstanceWidgetSettingsTest::testWidgetSettings in tests/src/Kernel/Migrate/MigrateFieldInstanceWidgetSettingsTest.php
Test that migrated view modes can be loaded using D8 APIs.

File

tests/src/Kernel/Migrate/MigrateFieldInstanceWidgetSettingsTest.php, line 49

Class

MigrateFieldInstanceWidgetSettingsTest
Tests migration of inline_entity_form widgets settings.

Namespace

Drupal\Tests\inline_entity_form\Kernel\Migrate

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
    ->assertIdentical($expected_entity_type, $entity
    ->getTargetEntityTypeId());
  $this
    ->assertIdentical($expected_bundle, $entity
    ->getTargetBundle());
}