ProductAttributeTest.php in Commerce Migrate 3.1.x
File
modules/ubercart/tests/src/Kernel/Migrate/uc6/ProductAttributeTest.php
View source
<?php
namespace Drupal\Tests\commerce_migrate_ubercart\Kernel\Migrate\uc6;
use Drupal\Tests\commerce_migrate\Kernel\CommerceMigrateTestTrait;
class ProductAttributeTest extends Ubercart6TestBase {
use CommerceMigrateTestTrait;
protected static $modules = [
'commerce_price',
'commerce_product',
'commerce_store',
];
protected function setUp() : void {
parent::setUp();
$this
->installEntitySchema('commerce_product_variation');
$this
->installEntitySchema('commerce_store');
$this
->executeMigrations([
'uc_attribute_field',
'uc_product_attribute',
]);
}
public function testMigrateProductAttributeTest() {
$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');
}
}