Move Carbon::setTestNow() to the beginning of each test before creating test data. Previously, tests created servers using now() (real current time) and only afterwards called Carbon::setTestNow(), making sentinel_updated_at inconsistent with the test clock. This caused staleness calculations to use different timelines: - sentinel_updated_at was based on real time (e.g., Dec 2024) - Test execution time was frozen at 2025-01-15 Now all timestamps use the same frozen test time, making staleness checks predictable and tests reliable regardless of when they run. Affected tests (all 7 test cases in the file): - does not dispatch storage check when sentinel is in sync - dispatches storage check when sentinel is out of sync - dispatches storage check when sentinel is disabled - respects custom hourly storage check frequency when sentinel is out of sync - handles VALID_CRON_STRINGS mapping correctly when sentinel is out of sync - respects server timezone for storage checks when sentinel is out of sync - does not dispatch storage check outside schedule 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <noreply@anthropic.com> |
||
|---|---|---|
| .. | ||
| Browser | ||
| Feature | ||
| Traits | ||
| Unit | ||
| CreatesApplication.php | ||
| DuskTestCase.php | ||
| Pest.php | ||
| TestCase.php | ||