You are here

protected function MigrateFieldInstanceWidgetSettingsTest::assertComponent in Inline Entity Form 8

Asserts various aspects of a particular component of a form display.

Parameters

string $display_id: The form display ID.

string $component_id: The component ID.

string $widget_type: The expected widget type.

string $weight: The expected weight of the component.

1 call to MigrateFieldInstanceWidgetSettingsTest::assertComponent()
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 69

Class

MigrateFieldInstanceWidgetSettingsTest
Tests migration of inline_entity_form widgets settings.

Namespace

Drupal\Tests\inline_entity_form\Kernel\Migrate

Code

protected function assertComponent($display_id, $component_id, $widget_type, $weight) {
  $component = EntityFormDisplay::load($display_id)
    ->getComponent($component_id);
  $this
    ->assertIsArray($component);
  $this
    ->assertIdentical($widget_type, $component['type']);
  $this
    ->assertIdentical($weight, $component['weight']);
}