You are here

protected function ProductTest::setUp in Commerce Migrate 3.1.x

Same name in this branch
  1. 3.1.x modules/csv_example/tests/src/Kernel/Migrate/ProductTest.php \Drupal\Tests\commerce_migrate_csv_example\Kernel\Migrate\ProductTest::setUp()
  2. 3.1.x modules/magento/tests/src/Kernel/Migrate/magento2/ProductTest.php \Drupal\Tests\commerce_migrate_magento\Kernel\Migrate\magento2\ProductTest::setUp()
  3. 3.1.x modules/ubercart/tests/src/Kernel/Migrate/uc7/ProductTest.php \Drupal\Tests\commerce_migrate_ubercart\Kernel\Migrate\uc7\ProductTest::setUp()
  4. 3.1.x modules/ubercart/tests/src/Kernel/Migrate/uc6/ProductTest.php \Drupal\Tests\commerce_migrate_ubercart\Kernel\Migrate\uc6\ProductTest::setUp()
  5. 3.1.x modules/commerce/tests/src/Kernel/Migrate/commerce1/ProductTest.php \Drupal\Tests\commerce_migrate_commerce\Kernel\Migrate\commerce1\ProductTest::setUp()
Same name and namespace in other branches
  1. 8.2 modules/commerce/tests/src/Kernel/Migrate/commerce1/ProductTest.php \Drupal\Tests\commerce_migrate_commerce\Kernel\Migrate\commerce1\ProductTest::setUp()
  2. 3.0.x modules/commerce/tests/src/Kernel/Migrate/commerce1/ProductTest.php \Drupal\Tests\commerce_migrate_commerce\Kernel\Migrate\commerce1\ProductTest::setUp()

Overrides MigrateDrupal7TestBase::setUp

File

modules/commerce/tests/src/Kernel/Migrate/commerce1/ProductTest.php, line 49

Class

ProductTest
Tests product migration.

Namespace

Drupal\Tests\commerce_migrate_commerce\Kernel\Migrate\commerce1

Code

protected function setUp() : void {
  parent::setUp();
  $this
    ->installEntitySchema('commerce_product');
  $this
    ->installEntitySchema('commerce_product_attribute');
  $this
    ->installEntitySchema('commerce_product_attribute_value');
  $this
    ->installEntitySchema('commerce_product_variation');
  $this
    ->installSchema('comment', [
    'comment_entity_statistics',
  ]);
  $this
    ->installEntitySchema('file');
  $this
    ->installEntitySchema('node');
  $this
    ->installEntitySchema('profile');
  $this
    ->installEntitySchema('taxonomy_term');
  $this
    ->installConfig([
    'node',
  ]);
  $this
    ->installConfig([
    'commerce_product',
  ]);
  $this
    ->migrateFiles();
  $this
    ->migrateFields();
  $this
    ->executeMigrations([
    'commerce1_product_attribute',
    'd7_taxonomy_term',
  ]);
  $this
    ->migrateProducts();
}