From ac979e5c1764557199b8e1443aea37e0eca38b11 Mon Sep 17 00:00:00 2001 From: Iman Ghafoori Date: Sat, 15 Jun 2024 14:11:12 +0330 Subject: [PATCH] fix tests Signed-off-by: Iman Ghafoori --- tests/EventsAuthorizationTest.php | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/tests/EventsAuthorizationTest.php b/tests/EventsAuthorizationTest.php index 30060f3..ae383fd 100644 --- a/tests/EventsAuthorizationTest.php +++ b/tests/EventsAuthorizationTest.php @@ -18,7 +18,8 @@ public function testEventIsAuthorized1() HeyMan::whenEventHappens(['myEvent', 'myEvent1'])->youShouldHaveRole('reader')->otherwise()->weDenyAccess(); app(StartGuarding::class)->start(); - MakeSure::about($this)->whenEventHappens('myEvent1')->exceptionIsThrown(AuthorizationException::class); + $this->expectException(AuthorizationException::class); + event('myEvent1'); } public function testEventIsAuthorized2()