ProductAttributeTest.php in Commerce Migrate 8.2
File
modules/magento/tests/src/Kernel/Migrate/magento2/ProductAttributeTest.php
View source
<?php
namespace Drupal\Tests\commerce_migrate_magento\Kernel\Migrate\magento2;
use Drupal\Tests\commerce_migrate\Kernel\CommerceMigrateTestTrait;
use Drupal\Tests\commerce_migrate\Kernel\CsvTestBase;
class ProductAttributeTest extends CsvTestBase {
use CommerceMigrateTestTrait;
public static $modules = [
'commerce_migrate',
'commerce_migrate_magento',
'commerce_product',
];
protected $fixtures = __DIR__ . '/../../../../fixtures/csv/magento2-catalog_product_20180326_013553.csv';
protected function setUp() {
parent::setUp();
$this
->executeMigration('magento2_product_attribute');
}
public function testMigrateProductAttributeTest() {
$this
->assertProductAttributeEntity('activity', 'Activity', 'select');
$this
->assertProductAttributeEntity('eco_collection', 'Eco collection', 'select');
$this
->assertProductAttributeEntity('performance_fabric', 'Performance fabric', 'select');
$this
->assertProductAttributeEntity('color', 'Color', 'select');
$this
->assertProductAttributeEntity('size', 'Size', 'select');
}
}