You are here

protected function MigrateFieldInstanceWidgetSettingsTest::assertEntity in Zircon Profile 8

Same name and namespace in other branches
  1. 8.0 core/modules/field/src/Tests/Migrate/d7/MigrateFieldInstanceWidgetSettingsTest.php \Drupal\field\Tests\Migrate\d7\MigrateFieldInstanceWidgetSettingsTest::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 MigrateFieldInstanceWidgetSettingsTest::assertEntity()
MigrateFieldInstanceWidgetSettingsTest::testWidgetSettings in core/modules/field/src/Tests/Migrate/d7/MigrateFieldInstanceWidgetSettingsTest.php
Test that migrated view modes can be loaded using D8 APIs.

File

core/modules/field/src/Tests/Migrate/d7/MigrateFieldInstanceWidgetSettingsTest.php, line 69
Contains \Drupal\field\Tests\Migrate\d7\MigrateFieldInstanceWidgetSettingsTest.

Class

MigrateFieldInstanceWidgetSettingsTest
Migrate field widget settings.

Namespace

Drupal\field\Tests\Migrate\d7

Code

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

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