ProductAttributeTest.php in Commerce Migrate 8.2
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;
public static $modules = [
'commerce_price',
'commerce_product',
'commerce_store',
];
protected function setUp() {
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');
}
}