protected function FieldWidgetSettingsTest::assertComponent in Commerce Migrate 3.1.x
Same name in this branch
- 3.1.x modules/ubercart/tests/src/Kernel/Migrate/uc7/FieldWidgetSettingsTest.php \Drupal\Tests\commerce_migrate_ubercart\Kernel\Migrate\uc7\FieldWidgetSettingsTest::assertComponent()
- 3.1.x modules/ubercart/tests/src/Kernel/Migrate/uc6/FieldWidgetSettingsTest.php \Drupal\Tests\commerce_migrate_ubercart\Kernel\Migrate\uc6\FieldWidgetSettingsTest::assertComponent()
Same name and namespace in other branches
- 8.2 modules/ubercart/tests/src/Kernel/Migrate/uc7/FieldWidgetSettingsTest.php \Drupal\Tests\commerce_migrate_ubercart\Kernel\Migrate\uc7\FieldWidgetSettingsTest::assertComponent()
- 3.0.x modules/ubercart/tests/src/Kernel/Migrate/uc7/FieldWidgetSettingsTest.php \Drupal\Tests\commerce_migrate_ubercart\Kernel\Migrate\uc7\FieldWidgetSettingsTest::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 FieldWidgetSettingsTest::assertComponent()
- FieldWidgetSettingsTest::testWidgetSettings in modules/
ubercart/ tests/ src/ Kernel/ Migrate/ uc7/ FieldWidgetSettingsTest.php - Test that commerce_product settings are created.
File
- modules/
ubercart/ tests/ src/ Kernel/ Migrate/ uc7/ FieldWidgetSettingsTest.php, line 77
Class
- FieldWidgetSettingsTest
- Tests migration of Ubercart 7 field widget settings.
Namespace
Drupal\Tests\commerce_migrate_ubercart\Kernel\Migrate\uc7Code
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']);
}