ProductAttributeTest.php in Commerce Migrate 3.0.x
File
modules/ubercart/tests/src/Kernel/Migrate/uc7/ProductAttributeTest.php
View source
<?php
namespace Drupal\Tests\commerce_migrate_ubercart\Kernel\Migrate\uc7;
use Drupal\Tests\commerce_migrate\Kernel\CommerceMigrateTestTrait;
class ProductAttributeTest extends Ubercart7TestBase {
use CommerceMigrateTestTrait;
public static $modules = [
'commerce_price',
'commerce_product',
];
protected function setUp() {
parent::setUp();
$this
->installEntitySchema('commerce_product_variation');
$this
->executeMigrations([
'uc_attribute_field',
'uc_product_attribute',
]);
}
public function testMigrateProductAttributeTest() {
$this
->assertProductAttributeEntity('size', 'Size', 'select');
$this
->assertProductAttributeEntity('extra', 'Extra', 'checkbox');
$this
->assertProductAttributeEntity('attribute_with_name_', 'Long name test', 'radios');
$this
->assertProductAttributeEntity('duration', 'Duration', 'text');
}
}