lorisleiva / laravel-actions

⚡️ Laravel components that take care of one specific task
https://laravelactions.com
MIT License
2.52k stars 124 forks source link

`shouldRun`'s docs aren't clear, or a bug, or a FR? #231

Open edalzell opened 1 year ago

edalzell commented 1 year ago

I was working on testing my actions and used the shouldRun method and it wasn't working.

Turns out I need to add ->once() in order for a test to actually run.

I'm not sure if this is a bug, a feature request or a documentation thing, please advise and I'll update the appropriate thing in a PR.

At a minimum I believe the docs should be updated to show a working example (as that's what I copied). Alternatively, we could update shouldRun etc to call once? In PHPUnit land you can use expects to call once automatically.

Ashraam commented 12 months ago

Can't agree more !

Wulfheart commented 1 month ago

Needs more investigation.