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/magento/tests/src/Kernel/Migrate/magento2/ProductTest.php \Drupal\Tests\commerce_migrate_magento\Kernel\Migrate\magento2\ProductTest::setUp()
  2. 3.0.x modules/magento/tests/src/Kernel/Migrate/magento2/ProductTest.php \Drupal\Tests\commerce_migrate_magento\Kernel\Migrate\magento2\ProductTest::setUp()

Overrides CsvTestBase::setUp

File

modules/magento/tests/src/Kernel/Migrate/magento2/ProductTest.php, line 57

Class

ProductTest
Tests Product migration.

Namespace

Drupal\Tests\commerce_migrate_magento\Kernel\Migrate\magento2

Code

protected function setUp() : void {
  parent::setUp();
  $this
    ->installEntitySchema('user');
  $this
    ->installSchema('user', [
    'users_data',
  ]);

  // Make sure uid 1 is created.
  user_install();
  $this
    ->installEntitySchema('commerce_store');
  $this
    ->installEntitySchema('commerce_product_variation');
  $this
    ->installEntitySchema('commerce_product');
  $this
    ->installConfig('commerce_product');
  $this
    ->createDefaultStore();
  $this
    ->executeMigrations([
    'magento2_product_variation_type',
    'magento2_product_variation',
    'magento2_product_type',
    'magento2_product',
  ]);
}