Skip to content

Commit ecb9295

Browse files
Update proposed/clock-meta.md
Co-authored-by: Woody Gilk <[email protected]>
1 parent 4a38ab2 commit ecb9295

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

proposed/clock-meta.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ There are currently a few libraries that provide this functionality, however the
1414

1515
Symfony provides a package called `symfony/phpunit-bridge` that has a `Symfony\Bridge\PhpUnit\ClockMock` class, which allows mocking PHP's built-in time and date functions, however this does not solve mocking calls to `new \DateTimeImmutable()`. It also does not fully mock time when called from other libraries that rely on the system time.
1616

17-
`Carbon\Carbon`and being forked from that also `Cake\Chronos\Chronos`do provide mocking via a static `setTestNow()` method, but this has its own pitfalls as it provides no isolation and must be called again to stop mocking.
17+
`Carbon\Carbon`, and its fork `Cake\Chronos\Chronos`, do provide mocking via a static `setTestNow()` method, but this provides no isolation and must be called again to stop mocking.
1818

1919
Pros:
2020

0 commit comments

Comments
 (0)