You are here

public function OrderMigrationClassTest::testClass in Commerce Migrate 3.0.x

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

Tests d6_profile_values builder.

Ensures profile fields are merged into the d6_profile_values migration's process pipeline.

File

modules/commerce/tests/src/Kernel/Migrate/commerce1/OrderMigrationClassTest.php, line 24

Class

OrderMigrationClassTest
Tests the order migration plugin class.

Namespace

Drupal\Tests\commerce_migrate_commerce\Kernel\Migrate\commerce1

Code

public function testClass() {
  $migration = $this
    ->getMigration('commerce1_order');

  /** @var \Drupal\migrate\Plugin\MigrationInterface[] $migrations */
  $this
    ->assertSame('commerce1_order', $migration
    ->id());
  $process = $migration
    ->getProcess();

  // Line items.
  $this
    ->assertSame('commerce_line_items', $process['order_items'][0]['source']);

  // Order total.
  $this
    ->assertSame('commerce_order_total', $process['total_price'][0]['source']);

  // Customer billing.
  $this
    ->assertSame('commerce_customer_billing', $process['billing_profile'][0]['source']);
}