protected function MigrateFieldInstanceWidgetSettingsTest::assertComponent in Drupal 9
Same name and namespace in other branches
- 8 core/modules/field/tests/src/Kernel/Migrate/d7/MigrateFieldInstanceWidgetSettingsTest.php \Drupal\Tests\field\Kernel\Migrate\d7\MigrateFieldInstanceWidgetSettingsTest::assertComponent()
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 core/
modules/ field/ tests/ src/ Kernel/ Migrate/ d7/ MigrateFieldInstanceWidgetSettingsTest.php - Tests that migrated view modes can be loaded using D8 APIs.
File
- core/
modules/ field/ tests/ src/ Kernel/ Migrate/ d7/ MigrateFieldInstanceWidgetSettingsTest.php, line 72
Class
- MigrateFieldInstanceWidgetSettingsTest
- Migrate field widget settings.
Namespace
Drupal\Tests\field\Kernel\Migrate\d7Code
protected function assertComponent($display_id, $component_id, $widget_type, $weight) {
$component = EntityFormDisplay::load($display_id)
->getComponent($component_id);
$this
->assertIsArray($component);
$this
->assertSame($widget_type, $component['type']);
$this
->assertSame($weight, $component['weight']);
}