public function AttributeFieldInstanceWidgetSettingsTest::testAttributeWidgetSettings in Commerce Migrate 8.2
Same name in this branch
- 8.2 modules/ubercart/tests/src/Kernel/Migrate/uc7/AttributeFieldInstanceWidgetSettingsTest.php \Drupal\Tests\commerce_migrate_ubercart\Kernel\Migrate\uc7\AttributeFieldInstanceWidgetSettingsTest::testAttributeWidgetSettings()
- 8.2 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
- 3.1.x modules/ubercart/tests/src/Kernel/Migrate/uc6/AttributeFieldInstanceWidgetSettingsTest.php \Drupal\Tests\commerce_migrate_ubercart\Kernel\Migrate\uc6\AttributeFieldInstanceWidgetSettingsTest::testAttributeWidgetSettings()
- 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\uc6Code
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);
}