public function MinorUnitsConverterTest::testUnknownCurrency in Commerce Core 8.2
Tests converting a price with an unknown currency.
@covers ::toMinorUnits
File
- modules/
price/ tests/ src/ Unit/ MinorUnitsConverterTest.php, line 45
Class
- MinorUnitsConverterTest
- Tests the MinorUnitsConverter class.
Namespace
Drupal\Tests\commerce_price\UnitCode
public function testUnknownCurrency() {
$this
->expectException(UnknownCurrencyException::class);
$this->minorUnitsConverter
->toMinorUnits(new Price('10', 'XYZ'));
}