protected function MigrateFieldInstanceWidgetSettingsTest::assertComponent in Drupal 10
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()
- 9 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.
@internal
Parameters
string $display_id: The form display ID.
string $component_id: The component ID.
string $widget_type: The expected widget type.
int $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 77
Class
- MigrateFieldInstanceWidgetSettingsTest
- Migrate field widget settings.
Namespace
Drupal\Tests\field\Kernel\Migrate\d7Code
protected function assertComponent(string $display_id, string $component_id, string $widget_type, int $weight) : void {
$component = EntityFormDisplay::load($display_id)
->getComponent($component_id);
$this
->assertIsArray($component);
$this
->assertSame($widget_type, $component['type']);
$this
->assertSame($weight, $component['weight']);
}