spatie/pest-plugin-test-time
Pest plugin to control time in tests via Carbon::setTestNow(): freeze “now” and easily move it forward/backward (e.g., addMinute). Includes a toBeCarbon expectation for asserting Carbon dates/times and formats.
Adopt this package when:
Look elsewhere if:
This plugin eliminates time-related test flakiness with a simple, Pest-native API to freeze, travel, and reset time—no more manual Carbon::setTestNow() clutter. For executives, it reduces production bugs from time-dependent logic and accelerates feature delivery by ensuring tests are deterministic and maintainable. For engineering, it streamlines test writing with clean, readable syntax that works seamlessly with Laravel’s time helpers, cutting test setup time by ~70% while improving reliability. MIT-licensed and maintained by Spatie, it’s a zero-cost, high-impact upgrade for any Laravel team using Pest.
How can I help you explore Laravel packages today?