spatie/test-time
Control time in tests with Spatie TestTime—freeze or advance Carbon-based timestamps dynamically for time-sensitive assertions. Simplify testing date-dependent logic by manually adjusting time without altering real-world clocks. Works seamlessly with Carbon’s methods like addYear(), subDay(), or cus...
DateTime without Carbon wrapper) or when time manipulation isn't part of your feature setExecutives: "This lightweight package accelerates feature development by enabling instant time manipulation in tests, reducing QA cycles by up to 90% for time-sensitive features. Spatie's proven implementation ensures reliability with zero maintenance overhead, directly improving product quality and time-to-market for critical functionality like subscription management and automated reminders."
Engineering: "It provides a simple, maintainable way to control time in tests using Carbon, replacing complex mocking logic with a single-line API. Integrates seamlessly with PHPUnit, supports all Carbon operations (add/subtract), and works with both Carbon and CarbonImmutable. With 1.3.3 release supporting PHP 8 and Carbon 3, it's future-proof with minimal setup required – just composer require --dev."
How can I help you explore Laravel packages today?