diff --git a/tests/ResolveInlineBehaviorTest.php b/tests/ResolveInlineBehaviorTest.php index ae621ac..9596169 100644 --- a/tests/ResolveInlineBehaviorTest.php +++ b/tests/ResolveInlineBehaviorTest.php @@ -68,3 +68,8 @@ ->toThrow(BehaviorNotFoundException::class, 'Behavior of type `events.nonExistentEvent` not found.'); }); +test('it throws exception when behavior type not found', function (): void { + // Act & Assert + expect(fn () => OrderMachine::getBehavior('invalidType.someBehavior')) + ->toThrow(BehaviorNotFoundException::class, 'Behavior of type `invalidType.someBehavior` not found.'); +});