From 921ade34eb3506ff310e64e37032d67d4bff807f Mon Sep 17 00:00:00 2001 From: juniwalk Date: Mon, 6 Jan 2025 10:54:07 +0100 Subject: [PATCH] Event::trigger no longer throws exception, remove from test --- src/Traits/Events.php | 3 --- tests/Traits/EventTest.php | 6 ------ 2 files changed, 9 deletions(-) diff --git a/src/Traits/Events.php b/src/Traits/Events.php index a56762a..111a912 100644 --- a/src/Traits/Events.php +++ b/src/Traits/Events.php @@ -129,9 +129,6 @@ protected function unwatch(string $event): static } - /** - * @throws InvalidStateException - */ protected function trigger(string $event, mixed ...$args): void { $event = Format::kebabCase($event); diff --git a/tests/Traits/EventTest.php b/tests/Traits/EventTest.php index 4448a97..2aa5986 100644 --- a/tests/Traits/EventTest.php +++ b/tests/Traits/EventTest.php @@ -96,12 +96,6 @@ public function __construct() {} 'Event "%w%" is not being watched.', ); - Assert::exception( - fn() => $eventTest->event(), - InvalidStateException::class, - 'Event "%w%" is not being watched.', - ); - Assert::false($eventTest->triggered); }