Skip to content

Commit 710d892

Browse files
committed
[Uid] Add documentation for MockUuidFactory usage in tests
1 parent 8182c7b commit 710d892

File tree

1 file changed

+4
-7
lines changed

1 file changed

+4
-7
lines changed

components/uid.rst

Lines changed: 4 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -437,13 +437,12 @@ MockUuidFactory
437437
===============
438438

439439
.. versionadded:: 7.4
440-
The :class:`Symfony\Component\Uid\Factory\MockUuidFactory` class was introduced in Symfony 7.4.
441440

442-
The :class:`Symfony\Component\Uid\Factory\MockUuidFactory` class allows you to control the UUIDs generated during your tests, making them predictable and reproducible.
441+
The :class:`Symfony\\Component\\Uid\\Factory\\MockUuidFactory` class was introduced in Symfony 7.4.
443442

444-
Suppose you have a service that generates a UUID for each new user:
443+
The :class:`Symfony\\Component\\Uid\\Factory\\MockUuidFactory` class allows you to control the UUIDs generated during your tests, making them predictable and reproducible.
445444

446-
.. code-block:: php
445+
Suppose you have a service that generates a UUID for each new user::
447446

448447
use Symfony\Component\Uid\Factory\UuidFactory;
449448
use Symfony\Component\Uid\Uuid;
@@ -458,9 +457,7 @@ Suppose you have a service that generates a UUID for each new user:
458457
}
459458
}
460459

461-
In your tests, you can use ``MockUuidFactory`` to inject predictable UUIDs and verify the expected behavior:
462-
463-
.. code-block:: php
460+
In your tests, you can use ``MockUuidFactory`` to inject predictable UUIDs and verify the expected behavior::
464461

465462
use PHPUnit\Framework\TestCase;
466463
use Symfony\Component\Uid\Factory\MockUuidFactory;

0 commit comments

Comments
 (0)