mirror of
https://github.com/archtechx/money.git
synced 2025-12-12 03:14:03 +00:00
test: updates
This commit is contained in:
parent
d6cb1ba6ae
commit
2a60b7b3d8
1 changed files with 3 additions and 2 deletions
|
|
@ -1,6 +1,7 @@
|
||||||
<?php
|
<?php
|
||||||
|
|
||||||
use ArchTech\Money\Currencies\USD;
|
use ArchTech\Money\Currencies\USD;
|
||||||
|
use ArchTech\Money\Exceptions\CannotExtractCurrencyException;
|
||||||
use ArchTech\Money\Money;
|
use ArchTech\Money\Money;
|
||||||
use ArchTech\Money\Tests\Currencies\CZK;
|
use ArchTech\Money\Tests\Currencies\CZK;
|
||||||
use ArchTech\Money\Tests\Currencies\EUR;
|
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);
|
currencies()->remove(USD::class);
|
||||||
|
|
||||||
pest()->expectException(\Exception::class);
|
pest()->expectException(CannotExtractCurrencyException::class);
|
||||||
Money::fromFormatted($formatted);
|
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' => '$']);
|
currencies()->add(['code' => 'USD2', 'name' => 'USD2', 'prefix' => '$']);
|
||||||
$money = money(1000);
|
$money = money(1000);
|
||||||
|
|
||||||
pest()->expectException(\Exception::class);
|
pest()->expectException(CannotExtractCurrencyException::class);
|
||||||
Money::fromFormatted($money->formatted());
|
Money::fromFormatted($money->formatted());
|
||||||
});
|
});
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue