php-mock/php-mock-mockery
Integrates php-mock with Mockery to mock PHP built-in functions in tests. Create namespaced function mocks with PHPMockery::mock() and set expectations/returns, then call Mockery::close(). Supports only unqualified calls; define early if needed.
time(), rand(), filesystem operations) without requiring dependency injection refactoring, preserving existing architecture.time() or rand() using familiar syntax—no refactoring needed. Just add a few lines to your tests for deterministic results, even for hard-to-isolate side effects like filesystem or network calls."How can I help you explore Laravel packages today?