diff -u b/modules/ubercart/migrations/d6_ubercart_field_attribute.yml b/modules/ubercart/migrations/d6_ubercart_field_attribute.yml --- b/modules/ubercart/migrations/d6_ubercart_field_attribute.yml +++ b/modules/ubercart/migrations/d6_ubercart_field_attribute.yml @@ -12,6 +12,7 @@ target_type: commerce_product_attribute_value type: entity_reference process: + aid: aid entity_type: 'constants/entity_type' langcode: 'constants/langcode' field_machine_name: only in patch2: unchanged: --- a/modules/ubercart/tests/src/Kernel/Migrate/d6/AttributeTest.php +++ b/modules/ubercart/tests/src/Kernel/Migrate/d6/AttributeTest.php @@ -68,7 +68,7 @@ class AttributeTest extends Ubercart6TestBase { } /** - * Test currency migration from Drupal 6 to 8. + * Test attribute migration from Drupal 6 to 8. */ public function testMigrateAttributeTest() { $dependencies = [ @@ -76,7 +76,7 @@ class AttributeTest extends Ubercart6TestBase { ]; $this->assertEntity('commerce_product_variation.attribute_design', 'entity_reference', TRUE, 1, $dependencies); $this->assertEntity('commerce_product_variation.attribute_color', 'entity_reference', TRUE, -1, $dependencies); - $this->assertEntity('commerce_product_variation.attribute_model_size', 'entity_reference', TRUE, 1, $dependencies); + $this->assertEntity('commerce_product_variation.attribute_model_size_attribute', 'entity_reference', TRUE, 1, $dependencies); $this->assertEntity('commerce_product_variation.attribute_name', 'entity_reference', TRUE, 1, $dependencies); } only in patch2: unchanged: --- a/modules/ubercart/tests/src/Kernel/Migrate/d6/ProductAttributeTest.php +++ b/modules/ubercart/tests/src/Kernel/Migrate/d6/ProductAttributeTest.php @@ -42,13 +42,13 @@ class ProductAttributeTest extends Ubercart6TestBase { } /** - * Test currency migration from Drupal 6 to 8. + * Test attribute migration from Drupal 6 to 8. */ public function testMigrateProductAttributeTest() { - $this->assertProductAttributeEntity('commerce_product_attribute.design', 'Cool Designs for your towel', 'radios'); - $this->assertProductAttributeEntity('commerce_product_attribute.color', 'Color', 'checkbox'); - $this->assertProductAttributeEntity('commerce_product_attribute.model_size', 'Model size', 'select'); - $this->assertProductAttributeEntity('commerce_product_attribute.name', 'Name', 'text'); + $this->assertProductAttributeEntity('design', 'Cool Designs for your towel', 'radios'); + $this->assertProductAttributeEntity('color', 'Color', 'checkbox'); + $this->assertProductAttributeEntity('model_size_attribute', 'Model size', 'select'); + $this->assertProductAttributeEntity('name', 'Name', 'text'); } } only in patch2: unchanged: --- a/modules/ubercart/tests/src/Kernel/Migrate/d6/ProductAttributeValueTest.php +++ b/modules/ubercart/tests/src/Kernel/Migrate/d6/ProductAttributeValueTest.php @@ -53,8 +53,8 @@ class ProductAttributeValueTest extends Ubercart6TestBase { $this->assertProductAttributeValueEntity('3', 'design', 'Pan Galactic Gargle Blaster', 'Pan Galactic Gargle Blaster', '0'); $this->assertProductAttributeValueEntity('4', 'color', 'White', 'White', '500'); $this->assertProductAttributeValueEntity('5', 'color', 'Gold', 'Gold', '500'); - $this->assertProductAttributeValueEntity('6', 'model_size', 'Keychain', 'Keychain', '20'); - $this->assertProductAttributeValueEntity('7', 'model_size', 'Desk', 'Desk', '400'); + $this->assertProductAttributeValueEntity('6', 'model_size_attribute', 'Keychain', 'Keychain', '20'); + $this->assertProductAttributeValueEntity('7', 'model_size_attribute', 'Desk', 'Desk', '400'); } } only in patch2: unchanged: --- a/tests/src/Kernel/CommerceMigrateTestTrait.php +++ b/tests/src/Kernel/CommerceMigrateTestTrait.php @@ -226,8 +226,7 @@ trait CommerceMigrateTestTrait { * The expected element type of the attribute. */ protected function assertProductAttributeEntity($id, $label, $element_type) { - list ($entity_type, $name) = explode('.', $id); - $attribute = ProductAttribute::load($name); + $attribute = ProductAttribute::load($id); $this->assertInstanceOf(ProductAttribute::class, $attribute); $this->assertSame($label, $attribute->label()); $this->assertSame($element_type, $attribute->getElementType());