mirror of
https://github.com/archtechx/money.git
synced 2025-12-12 11:24:03 +00:00
Update immutability tests
This commit is contained in:
parent
3a7deadd19
commit
8ce0b82ef0
1 changed files with 4 additions and 4 deletions
|
|
@ -11,8 +11,8 @@ test('Money value is immutable', function () {
|
|||
|
||||
try {
|
||||
$money->value = 200;
|
||||
} catch (Error $th) {
|
||||
expect($th->getMessage())->toStartWith('Cannot access protected property');
|
||||
} catch (Throwable $th) {
|
||||
expect($th)->toBeInstanceOf(Error::class);
|
||||
}
|
||||
});
|
||||
|
||||
|
|
@ -21,8 +21,8 @@ test('Money currency is immutable', function () {
|
|||
|
||||
try {
|
||||
$money->currency = 'EUR';
|
||||
} catch (Error $th) {
|
||||
expect($th->getMessage())->toStartWith('Cannot access protected property');
|
||||
} catch (Throwable $th) {
|
||||
expect($th)->toBeInstanceOf(Error::class);
|
||||
}
|
||||
});
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue