Registry / testing / spatie-test-time

spatie-test-time

JSON →
library1.3.3phppackagistunverified

A small package to control the flow time.

composer require spatie/test-time
INSTALL
IMPORT
SIG · SPATIE-TEST-TIME
S
spatie-test-time
testingphpv1.3.3
harness data pending
Install & Compatibility
Where this runs

No compatibility data collected yet for this library.

Code
Verified usage

Verified import paths — ran on the pinned version, not inferred.

TestTime
use Spatie\TestTime\TestTime;

Freeze time for testing purposes.

use Spatie\TestTime\TestTime; TestTime::freeze('2024-01-01 12:00:00'); echo now()->toDateTimeString(); // '2024-01-01 12:00:00'
Debug
Known issues
gotchaTestTime uses Carbon under the hood; ensure Carbon is installed.
fix
Require nesbot/carbon in your project.
affects: >=1.0
Upgrade
Version history
1.3.3latest on Packagist
Audit
Dependencies

No dependency data recorded yet.

Agent activity
12 hits · last 30 days
node
10
Resources
spatie-test-time — pip install spatie-test-time · libregistry