File tree Expand file tree Collapse file tree 1 file changed +12
-1
lines changed Expand file tree Collapse file tree 1 file changed +12
-1
lines changed Original file line number Diff line number Diff line change @@ -923,7 +923,18 @@ Browser Assertions
923
923
Asserts the given cookie in the test Client is set to the expected
924
924
value.
925
925
``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.
927
938
928
939
Crawler Assertions
929
940
..................
You can’t perform that action at this time.
0 commit comments