From 3a7deadd1916f49a1721d73465f9bc7ea2d52f4b Mon Sep 17 00:00:00 2001 From: lukinovec Date: Wed, 15 Feb 2023 17:42:52 +0100 Subject: [PATCH] Correct typehint --- tests/Pest/MoneyTest.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/tests/Pest/MoneyTest.php b/tests/Pest/MoneyTest.php index e3627ba..964be4a 100644 --- a/tests/Pest/MoneyTest.php +++ b/tests/Pest/MoneyTest.php @@ -11,7 +11,7 @@ test('Money value is immutable', function () { try { $money->value = 200; - } catch (\Throwable $th) { + } catch (Error $th) { expect($th->getMessage())->toStartWith('Cannot access protected property'); } }); @@ -21,7 +21,7 @@ test('Money currency is immutable', function () { try { $money->currency = 'EUR'; - } catch (\Throwable $th) { + } catch (Error $th) { expect($th->getMessage())->toStartWith('Cannot access protected property'); } });