protected function FieldInstanceWidgetSettingsTest::assertComponent in Commerce Migrate 8.2
Same name and namespace in other branches
- 3.1.x modules/commerce/tests/src/Kernel/Migrate/commerce1/FieldInstanceWidgetSettingsTest.php \Drupal\Tests\commerce_migrate_commerce\Kernel\Migrate\commerce1\FieldInstanceWidgetSettingsTest::assertComponent()
- 3.0.x modules/commerce/tests/src/Kernel/Migrate/commerce1/FieldInstanceWidgetSettingsTest.php \Drupal\Tests\commerce_migrate_commerce\Kernel\Migrate\commerce1\FieldInstanceWidgetSettingsTest::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 FieldInstanceWidgetSettingsTest::assertComponent()
- FieldInstanceWidgetSettingsTest::testWidgetSettings in modules/
commerce/ tests/ src/ Kernel/ Migrate/ commerce1/ FieldInstanceWidgetSettingsTest.php - Test that migrated view modes can be loaded using D8 APIs.
File
- modules/
commerce/ tests/ src/ Kernel/ Migrate/ commerce1/ FieldInstanceWidgetSettingsTest.php, line 99
Class
- FieldInstanceWidgetSettingsTest
- Tests field instance widget settings migration.
Namespace
Drupal\Tests\commerce_migrate_commerce\Kernel\Migrate\commerce1Code
protected function assertComponent($display_id, $component_id, $widget_type, $weight) {
$component = EntityFormDisplay::load($display_id)
->getComponent($component_id);
$this
->assertTrue(is_array($component));
$this
->assertSame($widget_type, $component['type']);
$this
->assertSame($weight, $component['weight']);
}