You are here

protected function AttributeFieldInstanceWidgetSettingsTest::assertComponent in Commerce Migrate 3.0.x

Same name in this branch
  1. 3.0.x modules/ubercart/tests/src/Kernel/Migrate/uc7/AttributeFieldInstanceWidgetSettingsTest.php \Drupal\Tests\commerce_migrate_ubercart\Kernel\Migrate\uc7\AttributeFieldInstanceWidgetSettingsTest::assertComponent()
  2. 3.0.x modules/ubercart/tests/src/Kernel/Migrate/uc6/AttributeFieldInstanceWidgetSettingsTest.php \Drupal\Tests\commerce_migrate_ubercart\Kernel\Migrate\uc6\AttributeFieldInstanceWidgetSettingsTest::assertComponent()
Same name and namespace in other branches
  1. 8.2 modules/ubercart/tests/src/Kernel/Migrate/uc7/AttributeFieldInstanceWidgetSettingsTest.php \Drupal\Tests\commerce_migrate_ubercart\Kernel\Migrate\uc7\AttributeFieldInstanceWidgetSettingsTest::assertComponent()
  2. 3.1.x modules/ubercart/tests/src/Kernel/Migrate/uc7/AttributeFieldInstanceWidgetSettingsTest.php \Drupal\Tests\commerce_migrate_ubercart\Kernel\Migrate\uc7\AttributeFieldInstanceWidgetSettingsTest::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 AttributeFieldInstanceWidgetSettingsTest::assertComponent()
AttributeFieldInstanceWidgetSettingsTest::testAttributeWidgetSettings in modules/ubercart/tests/src/Kernel/Migrate/uc7/AttributeFieldInstanceWidgetSettingsTest.php
Test the migration of the attributes on the product variation form display.

File

modules/ubercart/tests/src/Kernel/Migrate/uc7/AttributeFieldInstanceWidgetSettingsTest.php, line 67

Class

AttributeFieldInstanceWidgetSettingsTest
Tests attribute field instance widget settings migration.

Namespace

Drupal\Tests\commerce_migrate_ubercart\Kernel\Migrate\uc7

Code

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']);
}