avris/function-mock
Mock PHP functions in unit tests without changing your code. avris/function-mock lets you replace and control built-in and user-defined function calls at runtime, making it easier to test legacy code, edge cases, and hard-to-isolate behavior.
Lightweight class for mocking global functions
How can I help you explore Laravel packages today?