public function PriceTest::testInvalidNumber in Commerce Core 8.2
Tests creating a price with an invalid number.
::covers __construct.
File
- modules/
price/ tests/ src/ Unit/ PriceTest.php, line 61
Class
- PriceTest
- Tests the Price class.
Namespace
Drupal\Tests\commerce_price\UnitCode
public function testInvalidNumber() {
$this
->expectException(\InvalidArgumentException::class);
$price = new Price('INVALID', 'USD');
}