8000
We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 181861e commit 51a3924Copy full SHA for 51a3924
components/phpunit_bridge.rst
@@ -330,7 +330,10 @@ Clock Mocking
330
331
The :class:`Symfony\\Bridge\\PhpUnit\\ClockMock` class provided by this bridge
332
allows you to mock the PHP's built-in time functions ``time()``,
333
-``microtime()``, ``sleep()`` and ``usleep()``.
+``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.
337
338
To use the ``ClockMock`` class in your test, add the ``@group time-sensitive``
339
annotation to its class or methods. This annotation only works when executing
0 commit comments