Pest Plugin Test Time
Description
A Pest plugin to control the flow of time
Installation
This entry records only its repository, not the path inside it, so there is no
exact command to give. Open the source below and copy the folder into
~/.claude/skills/, or the file into ~/.claude/agents/.
README
A Pest plugin to control the flow of time
[](https://packagist.org/packages/spatie/pest-plugin-test-time) [](https://github.com/spatie/pest-plugin-test-time/actions/workflows/run-tests.yml) [](https://packagist.org/packages/spatie/pest-plugin-test-time)
This [Pest](https://pestphp.com) plugin offers a function `testTime` that allows you to freeze and manipulate the current time in your tests.
use function Spatie\PestPluginTestTime\testTime;
testTime()->freeze(); // time will not change anymore
testTime()->addMinute(); // move time forward one minute
It also contains a custom expectation called `toBeCarbon` to easily check the values of `Carbon` instances.
$carbon = Carbon::createFromFormat('Y-m-d H:i:s', '2022-05-31 01:02:03');
// make an expectation on the whole date, including time
expect($carbon)->toBeCarbon('2022-05-31 01:02:03');
// make an expectation on only the date part
expect($carbon)->toBeCarbon('2022-05-31');
// explicitly pass in a format
expect($carbon)->toBeCarbon('2022', 'Y');
Support us
[
](https://spatie.be/github-ad-click/pest-plugin-test-time)
We invest a lot of resources into creating [best in class open source packages](https://spatie.be/open-source). You can support us by [buying one of our paid products](https://spatie.be/open-source/support-us).
We highly appreciate you sending us a postcard from your hometown, mentioning which of our package(s) you are using. You'll find our address on [our contact page](https://spatie.be/about-us). We publish all received postcards on [our virtual
Related Skills
Spec Kit
💫 Toolkit to help you get started with Spec-Driven Development
Testing Webapp Testing
Test local web applications using Playwright for UI verification and debugging
Testing #29
, [#52](https://github.com/affaan-m/everything-claude-code/issues/52), [#103](https://github.com/affaan-m/ever
Testing Fix Issue
by metabase - Addresses GitHub issues by taking issue number as parameter, analyzing context, implementing sol
Testing Pypict Test Design
Design comprehensive test cases using PICT (Pairwise Independent Combinatorial Testing) for optimized test sui
Testing gstack
| 15,000+ | Garry Tan's exact Claude Code setup: 6 opinionated tools that serve as CEO, Eng Manager, Release M
Testing