You are here

public function AttributeFieldTest::testAttribute in Commerce Migrate 8.2

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

Test attribute field storage migration.

File

modules/ubercart/tests/src/Kernel/Migrate/uc7/AttributeFieldTest.php, line 73

Class

AttributeFieldTest
Tests attribute field storage migration.

Namespace

Drupal\Tests\commerce_migrate_ubercart\Kernel\Migrate\uc7

Code

public function testAttribute() {
  $dependencies = [
    'module' => [
      'commerce_product',
    ],
  ];
  $this
    ->assertEntity('commerce_product_variation.attribute_size', 'entity_reference', TRUE, 1, $dependencies);
  $this
    ->assertEntity('commerce_product_variation.attribute_extra', 'entity_reference', TRUE, -1, $dependencies);
  $this
    ->assertEntity('commerce_product_variation.attribute_attribute_with_name_', 'entity_reference', TRUE, 1, $dependencies);
  $this
    ->assertEntity('commerce_product_variation.attribute_duration', 'entity_reference', TRUE, 1, $dependencies);
}