You are here

public function AttributeFieldInstanceWidgetSettingsTest::testAttributeWidgetSettings in Commerce Migrate 3.1.x

Same name in this branch
  1. 3.1.x modules/ubercart/tests/src/Kernel/Migrate/uc7/AttributeFieldInstanceWidgetSettingsTest.php \Drupal\Tests\commerce_migrate_ubercart\Kernel\Migrate\uc7\AttributeFieldInstanceWidgetSettingsTest::testAttributeWidgetSettings()
  2. 3.1.x modules/ubercart/tests/src/Kernel/Migrate/uc6/AttributeFieldInstanceWidgetSettingsTest.php \Drupal\Tests\commerce_migrate_ubercart\Kernel\Migrate\uc6\AttributeFieldInstanceWidgetSettingsTest::testAttributeWidgetSettings()
Same name and namespace in other branches
  1. 8.2 modules/ubercart/tests/src/Kernel/Migrate/uc6/AttributeFieldInstanceWidgetSettingsTest.php \Drupal\Tests\commerce_migrate_ubercart\Kernel\Migrate\uc6\AttributeFieldInstanceWidgetSettingsTest::testAttributeWidgetSettings()
  2. 3.0.x modules/ubercart/tests/src/Kernel/Migrate/uc6/AttributeFieldInstanceWidgetSettingsTest.php \Drupal\Tests\commerce_migrate_ubercart\Kernel\Migrate\uc6\AttributeFieldInstanceWidgetSettingsTest::testAttributeWidgetSettings()

Test the migration of the attributes on the product variation form display.

File

modules/ubercart/tests/src/Kernel/Migrate/uc6/AttributeFieldInstanceWidgetSettingsTest.php, line 76

Class

AttributeFieldInstanceWidgetSettingsTest
Tests attribute field instance widget settings migration.

Namespace

Drupal\Tests\commerce_migrate_ubercart\Kernel\Migrate\uc6

Code

public function testAttributeWidgetSettings() {
  $this
    ->assertEntity('commerce_product_variation.default.default', 'commerce_product_variation', 'default');
  $this
    ->assertComponent('commerce_product_variation.default.default', 'attribute_color', 'boolean_checkbox', 500);
  $this
    ->assertComponent('commerce_product_variation.default.default', 'attribute_design', 'options_buttons', 0);
  $this
    ->assertComponent('commerce_product_variation.default.default', 'attribute_model_size_attribute', 'options_select', 400);
  $display = EntityFormDisplay::load('commerce_product_variation.default.default');
  $this
    ->assertInstanceOf(EntityFormDisplay::class, $display);
  $component = $display
    ->getComponent('attribute_name');
  $this
    ->assertNull($component);
}