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.
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 callonce
? In PHPUnit land you can useexpects
to callonce
automatically.