php-mock/php-mock-phpunit
Integrate php-mock with PHPUnit to mock built-in PHP functions (like time(), file_get_contents(), etc.) in a controlled, namespaced way. Ideal for unit tests that need to simulate IO, time, and other global behaviors without changing production code.
time() and rand() with automatic restoration. Eliminates the need for wrapper classes or DI in legacy code, with minimal setup and full CI compatibility—cutting test maintenance effort by 30%."How can I help you explore Laravel packages today?