You are here

public function MinorUnitsConverterTest::currencyConversionData in Commerce Core 8.2

Data provider for ::testConversion.

Return value

array The test data.

File

modules/price/tests/src/Unit/MinorUnitsConverterTest.php, line 67

Class

MinorUnitsConverterTest
Tests the MinorUnitsConverter class.

Namespace

Drupal\Tests\commerce_price\Unit

Code

public function currencyConversionData() {
  return [
    [
      new Price(10, 'EUR'),
      1000,
    ],
    [
      new Price(1.23, 'USD'),
      123,
    ],
    [
      new Price(0.99, 'NOK'),
      99,
    ],
    [
      new Price(99, 'JPY'),
      99,
    ],
    [
      new Price(99, 'KWD'),
      99000,
    ],
  ];
}