Skip to content

Commit 409a7f9

Browse files
committed
Minor reword
1 parent 7744bea commit 409a7f9

File tree

1 file changed

+12
-1
lines changed

1 file changed

+12
-1
lines changed

testing.rst

Lines changed: 12 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -923,7 +923,18 @@ Browser Assertions
923923
Asserts the given cookie in the test Client is set to the expected
924924
value.
925925
``assertThatForClient(Constraint $constraint, string $message = '')``
926-
Asserts the given Constraint in Client.
926+
Asserts the given Constraint in the Client. Useful to use your custom asserts
927+
in the same way of built-in asserts (i.e. without passing the Client as argument)::
928+
929+
// add this method in some custom class imported in your tests
930+
protected static function assertMyOwnCustomAssert(): void
931+
{
932+
self::assertThatForClient(new SomeCustomConstraint());
933+
}
934+
935+
.. versionadded:: 5.4
936+
937+
The ``assertThatForClient()`` method was introduced in Symfony 5.4.
927938

928939
Crawler Assertions
929940
..................

0 commit comments

Comments
 (0)