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); }