call('save') ->assertDispatched('toast', type: 'success', title: 'Saved', description: 'Your settings are stored.', timeout: 4000); }); it('passes a timeout through', function () { Livewire::test(ToastingComponent::class) ->call('fail') ->assertDispatched('toast', type: 'error', title: 'Could not save', description: null, timeout: 8000); }); it('keeps the toast across a redirect', function () { Livewire::test(ToastingComponent::class) ->call('leave') ->assertDispatched('toast', type: 'info', title: 'Link copied') ->assertRedirect('/elsewhere'); }); it('is not an action the browser can call', function () { expect(fn () => Livewire::test(ToastingComponent::class)->call('success', 'Forged')) ->toThrow(MethodNotFoundException::class); });