You are here

public function CommerceAdjustmentsTest::providerExceptionPrice in Commerce Migrate 8.2

Same name and namespace in other branches
  1. 3.1.x tests/src/Kernel/Plugin/migrate/process/CommerceAdjustmentsTest.php \Drupal\Tests\commerce_migrate\Kernel\Plugin\migrate\process\CommerceAdjustmentsTest::providerExceptionPrice()
  2. 3.0.x tests/src/Kernel/Plugin/migrate/process/CommerceAdjustmentsTest.php \Drupal\Tests\commerce_migrate\Kernel\Plugin\migrate\process\CommerceAdjustmentsTest::providerExceptionPrice()

Data provider for testExceptionPrice.

File

tests/src/Kernel/Plugin/migrate/process/CommerceAdjustmentsTest.php, line 209

Class

CommerceAdjustmentsTest
Tests the CommerceAdjustment plugin.

Namespace

Drupal\Tests\commerce_migrate\Kernel\Plugin\migrate\process

Code

public function providerExceptionPrice() {
  $tests = [
    [
      // Empty currency_code field.
      [
        'type' => 'custom',
        'title' => 'test',
        'amount' => '1.00',
        'currency_code' => '',
      ],
    ],
    [
      // Futuristic currency_code.
      [
        'type' => 'custom',
        'title' => 'test',
        'amount' => '2.00',
        'currency_code' => 'Latinum',
      ],
    ],
    [
      // Numeric currency_code.
      [
        'type' => 'custom',
        'title' => 'test',
        'amount' => '3.00',
        'currency_code' => '1234',
      ],
    ],
    [
      // Numeric currency_code.
      [
        'type' => 'custom',
        'title' => 'test',
        'amount' => 'string',
        'currency_code' => 'CAD',
      ],
    ],
  ];
  return $tests;
}