File tree Expand file tree Collapse file tree 1 file changed +4
-1
lines changed Expand file tree Collapse file tree 1 file changed +4
-1
lines changed Original file line number Diff line number Diff line change @@ -330,7 +330,10 @@ Clock Mocking
330330
331331The :class: `Symfony\\ Bridge\\ PhpUnit\\ ClockMock ` class provided by this bridge
332332allows you to mock the PHP's built-in time functions ``time() ``,
333- ``microtime() ``, ``sleep() `` and ``usleep() ``.
333+ ``microtime() ``, ``sleep() `` and ``usleep() ``. Additionally the function
334+ ``date() `` is mocked so it uses the mocked time if no timestamp is specified.
335+ Other functions with an optional timestamp parameter that defaults to ``time() ``
336+ will still use the system time instead of the mocked time.
334337
335338To use the ``ClockMock `` class in your test, add the ``@group time-sensitive ``
336339annotation to its class or methods. This annotation only works when executing
You can’t perform that action at this time.
0 commit comments