Skip to content

Commit b0440a4

Browse files
committed
minor #17222 [PHPUnitBridge]  add hrtime() to the list of mocked PHP functions (xabbuh)
This PR was merged into the 6.2 branch. Discussion ---------- [PHPUnitBridge]  add hrtime() to the list of mocked PHP functions fixes #17195 Commits ------- a73f29e add hrtime() to the list of mocked PHP functions
2 parents dbb34a4 + a73f29e commit b0440a4

File tree

1 file changed

+7
-2
lines changed

1 file changed

+7
-2
lines changed

components/phpunit_bridge.rst

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -534,8 +534,13 @@ Clock Mocking
534534

535535
The :class:`Symfony\\Bridge\\PhpUnit\\ClockMock` class provided by this bridge
536536
allows you to mock the PHP's built-in time functions ``time()``, ``microtime()``,
537-
``sleep()``, ``usleep()`` and ``gmdate()``. Additionally the function ``date()``
538-
is mocked so it uses the mocked time if no timestamp is specified.
537+
``sleep()``, ``usleep()``, ``gmdate()``, and ``hrtime()`. Additionally the
538+
function ``date()`` is mocked so it uses the mocked time if no timestamp is
539+
specified.
540+
541+
.. versionadded:: 6.2
542+
543+
Support for mocking the ``hrtime()`` function was introduced in Symfony 6.2.
539544

540545
Other functions with an optional timestamp parameter that defaults to ``time()``
541546
will still use the system time instead of the mocked time. This means that you

0 commit comments

Comments
 (0)