You are here

protected function Commerce1TestBase::migrateOrderItems in Commerce Migrate 8.2

Same name and namespace in other branches
  1. 3.1.x modules/commerce/tests/src/Kernel/Migrate/commerce1/Commerce1TestBase.php \Drupal\Tests\commerce_migrate_commerce\Kernel\Migrate\commerce1\Commerce1TestBase::migrateOrderItems()
  2. 3.0.x modules/commerce/tests/src/Kernel/Migrate/commerce1/Commerce1TestBase.php \Drupal\Tests\commerce_migrate_commerce\Kernel\Migrate\commerce1\Commerce1TestBase::migrateOrderItems()

Executes order item migration.

Required modules:

  • commerce_order.
  • commerce_price.
  • commerce_product.
  • commerce_store.
  • migrate_plus.
  • path.
3 calls to Commerce1TestBase::migrateOrderItems()
Commerce1TestBase::migrateOrders in modules/commerce/tests/src/Kernel/Migrate/commerce1/Commerce1TestBase.php
Executes order migration.
Commerce1TestBase::migrateOrdersWithCart in modules/commerce/tests/src/Kernel/Migrate/commerce1/Commerce1TestBase.php
Executes order migration with the cart enabled.
OrderItemTest::setUp in modules/commerce/tests/src/Kernel/Migrate/commerce1/OrderItemTest.php

File

modules/commerce/tests/src/Kernel/Migrate/commerce1/Commerce1TestBase.php, line 157

Class

Commerce1TestBase
Base class for Commerce 1 migration tests.

Namespace

Drupal\Tests\commerce_migrate_commerce\Kernel\Migrate\commerce1

Code

protected function migrateOrderItems() {
  $this
    ->installEntitySchema('commerce_store');
  $this
    ->installEntitySchema('commerce_order');
  $this
    ->installEntitySchema('commerce_order_item');
  $this
    ->installEntitySchema('commerce_product_variation');
  $this
    ->installEntitySchema('profile');
  $this
    ->installConfig([
    'commerce_order',
  ]);
  $this
    ->migrateProducts();
  $this
    ->installSchema('commerce_number_pattern', [
    'commerce_number_pattern_sequence',
  ]);
  $this
    ->installConfig([
    'commerce_order',
    'commerce_product',
  ]);
  $this
    ->executeMigrations([
    'commerce1_order_item_type',
    'commerce1_order_item',
  ]);
}