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...
|
Package
|
Score
|
Description
|
Stars
|
Likes
|
Forks
|
Downloads
|
Issues
|
Score
|
Opportunity
|
License
|
Last Release
|
|
|---|---|---|---|---|---|---|---|---|---|---|---|---|
| spatie/pest-plugin-test-time | 0.84 | 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. | 49 | 49 | 8 | 41K | 0 | 23.2 | 48.6 | MIT | 9 months ago | |
| beste/clock | 0.82 | beste/clock is a lightweight PHP clock implementation for time-dependent code. It provides a simple, test-friendly way to obtain the current time, swap in fixed or mock clocks, and improve determinism across your application and automated tests. | 74 | 74 | 1 | 1M | 0 | 2.5 | 55.3 | MIT | 3 years ago | |
| spatie/period | 0.82 | Immutable date period objects for PHP with powerful comparison tools. Create periods from any DateTime (including Carbon), then calculate overlaps, gaps, intersections, differences, containment, and other complex comparisons across two or many periods. | 1,694 | 1,697 | 76 | 154K | 0 | 19.8 | 27.1 | MIT | 3 years ago | |
| spatie/phpunit-snapshot-assertions | 0.80 | Add snapshot testing to PHPUnit. Assert strings, JSON, arrays, and objects against saved snapshots; first run writes snapshots, later runs compare and fail on regressions. Simple trait-based API (e.g., assertMatchesJsonSnapshot) for PHP and Laravel projects. | 695 | 698 | 74 | 579K | 0 | 33.4 | 46.9 | MIT | 1 month ago | |
| spatie/laravel-flash | 0.80 | Lightweight Laravel package for flashing a single message to the next request via session. Use flash('Message', 'optional-class') in controllers and read flash()->message and flash()->class in your Blade views to display and style it. | 669 | 671 | 33 | 38K | 0 | 24.4 | 27.3 | MIT | 3 months ago | |
| spatie/google-time-zone | 0.80 | Convert GPS coordinates to a time zone using Google’s Time Zone API. Fetch DST and raw offsets plus timeZoneId and timeZoneName for any latitude/longitude. Works in any PHP project, with optional Laravel config publishing and auto-discovery. | 109 | 111 | 16 | 22K | 0 | 18.4 | 35.7 | MIT | 3 months ago | |
| spatie/url | 0.79 | Immutable URL parser/builder for PHP. Parse scheme, host, path and query, then fluently transform parts (withHost, withPath, withScheme) and manage query parameters. Supports allowed/sanitized schemes for safer URL handling. | 739 | 752 | 60 | 413K | 0 | 12.4 | 37.9 | MIT | 2 years ago | |
| php-standard-library/date-time | 0.78 | Immutable, timezone-aware DateTime types for PHP. Provides Duration, Period, and Interval helpers for safer date/time arithmetic and ranges, designed as a standard-library style package with clear docs and contribution links. | 1 | 1 | 0 | 28K | 0 | 21.2 | 64.8 | MIT | 1 week ago |
How can I help you explore Laravel packages today?