You are here

public function CommercePriceTest::providerTestCommercePrice in Commerce Migrate 3.0.x

Same name in this branch
  1. 3.0.x modules/magento/tests/src/Unit/Plugin/migrate/process/CommercePriceTest.php \Drupal\Tests\commerce_migrate_magento\Unit\Plugin\migrate\process\CommercePriceTest::providerTestCommercePrice()
  2. 3.0.x modules/csv_example/tests/src/Unit/Plugin/migrate/process/CommercePriceTest.php \Drupal\Tests\commerce_migrate_csv_example\Unit\Plugin\migrate\process\CommercePriceTest::providerTestCommercePrice()
  3. 3.0.x modules/shopify/tests/src/Unit/Plugin/migrate/process/CommercePriceTest.php \Drupal\Tests\commerce_migrate_shopify\Unit\Plugin\migrate\process\CommercePriceTest::providerTestCommercePrice()
  4. 3.0.x modules/commerce/tests/src/Unit/Plugin/migrate/process/commerce1/CommercePriceTest.php \Drupal\Tests\commerce_migrate_commerce\Unit\Plugin\migrate\process\commerce1\CommercePriceTest::providerTestCommercePrice()
Same name and namespace in other branches
  1. 8.2 modules/shopify/tests/src/Unit/Plugin/migrate/process/CommercePriceTest.php \Drupal\Tests\commerce_migrate_shopify\Unit\Plugin\migrate\process\CommercePriceTest::providerTestCommercePrice()
  2. 3.1.x modules/shopify/tests/src/Unit/Plugin/migrate/process/CommercePriceTest.php \Drupal\Tests\commerce_migrate_shopify\Unit\Plugin\migrate\process\CommercePriceTest::providerTestCommercePrice()

Data provider for testCommercePrice().

File

modules/shopify/tests/src/Unit/Plugin/migrate/process/CommercePriceTest.php, line 32

Class

CommercePriceTest
Tests the Commerce Price plugin.

Namespace

Drupal\Tests\commerce_migrate_shopify\Unit\Plugin\migrate\process

Code

public function providerTestCommercePrice() {
  return [
    'upper case currency' => [
      [
        234,
        'NZD',
      ],
      [
        'number' => 234,
        'currency_code' => 'NZD',
      ],
    ],
    'lower case currency' => [
      [
        234.5,
        'nzd',
      ],
      [
        'number' => 234.5,
        'currency_code' => 'NZD',
      ],
    ],
  ];
}