1
0
Fork 0
mirror of https://github.com/archtechx/money.git synced 2025-12-12 03:14:03 +00:00

test: updates

This commit is contained in:
Gaurav 2022-03-15 17:06:44 +05:30
parent d6cb1ba6ae
commit 2a60b7b3d8

View file

@ -1,6 +1,7 @@
<?php
use ArchTech\Money\Currencies\USD;
use ArchTech\Money\Exceptions\CannotExtractCurrencyException;
use ArchTech\Money\Money;
use ArchTech\Money\Tests\Currencies\CZK;
use ArchTech\Money\Tests\Currencies\EUR;
@ -165,7 +166,7 @@ test('an exception is thrown if none of the currencies match the prefix and suff
currencies()->remove(USD::class);
pest()->expectException(\Exception::class);
pest()->expectException(CannotExtractCurrencyException::class);
Money::fromFormatted($formatted);
});
@ -173,7 +174,7 @@ test('an exception is thrown if multiple currencies are using the same prefix an
currencies()->add(['code' => 'USD2', 'name' => 'USD2', 'prefix' => '$']);
$money = money(1000);
pest()->expectException(\Exception::class);
pest()->expectException(CannotExtractCurrencyException::class);
Money::fromFormatted($money->formatted());
});