You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
-
Collection::shuffle
makes use of theRandomizer
class of PHP and instantiates one as needed.When running tests that make use of this it makes writing tests around it a bit more tedious.
To solve this, I suggest resolving Randomizer using the service container.
If a more gradual approach is wanted, using an alias like
arr.randomizer
could be an option.To set the Randomizer, either a manual binding to the class (or alias) can be done, or be creating a new static method to set the Randomizer:
I’d be happy to provide a PR for this.
Beta Was this translation helpful? Give feedback.
All reactions