You are here

public function OrderAdjustmentShippingTest::providerTestOrderAdjustmentShipping in Commerce Migrate 3.1.x

Same name and namespace in other branches
  1. 8.2 modules/commerce/tests/src/Unit/Plugin/migrate/process/commerce1/OrderAdjustmentShippingTest.php \Drupal\Tests\commerce_migrate_commerce\Unit\Plugin\migrate\process\commerce1\OrderAdjustmentShippingTest::providerTestOrderAdjustmentShipping()
  2. 3.0.x modules/commerce/tests/src/Unit/Plugin/migrate/process/commerce1/OrderAdjustmentShippingTest.php \Drupal\Tests\commerce_migrate_commerce\Unit\Plugin\migrate\process\commerce1\OrderAdjustmentShippingTest::providerTestOrderAdjustmentShipping()

Data provider for testOrderAdjustmentShipping().

File

modules/commerce/tests/src/Unit/Plugin/migrate/process/commerce1/OrderAdjustmentShippingTest.php, line 33

Class

OrderAdjustmentShippingTest
Tests the Order Adjustment Shipping plugin.

Namespace

Drupal\Tests\commerce_migrate_commerce\Unit\Plugin\migrate\process\commerce1

Code

public function providerTestOrderAdjustmentShipping() {
  return [
    'string' => [
      'invalid',
      [],
    ],
    'shipping line item' => [
      [
        'line_item_id' => '11',
        'order_id' => '1',
        'type' => 'shipping',
        'line_item_label' => 'Express shipping: 1 business day',
        'quantity' => '1.00',
        'created' => '1508452598',
        'changed' => '1508452598',
        'data' => [],
        'commerce_total' => [
          [
            'amount' => '1500',
            'currency_code' => 'USD',
            'data' => [],
            'fraction_digits' => 2,
          ],
        ],
      ],
      [
        'type' => 'shipping',
        'label' => 'Express shipping: 1 business day',
        'amount' => '15',
        'currency_code' => 'USD',
        'sourceId' => 'custom',
        'included' => FALSE,
        'locked' => TRUE,
      ],
    ],
  ];
}