Skip to content

Commit

Permalink
minor symfony#20284 [Testing] Update testing.rst (damien-louis)
Browse files Browse the repository at this point in the history
This PR was submitted for the 7.1 branch but it was merged into the 5.4 branch instead.

Discussion
----------

[Testing] Update testing.rst

Adding a little info about loginUser() method.

Commits
-------

9cedefa Update testing.rst
  • Loading branch information
javiereguiluz committed Oct 2, 2024
2 parents 0160e14 + 9cedefa commit ae79b24
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions testing.rst
Original file line number Diff line number Diff line change
Expand Up @@ -759,6 +759,10 @@ You can pass any
:class:`Symfony\\Bundle\\FrameworkBundle\\Test\\TestBrowserToken` object and
stores in the session of the test client.

To set a specific firewall (``main`` is set by default)::

$client->loginUser($testUser, 'my_firewall');

.. note::

By design, the ``loginUser()`` method doesn't work when using stateless firewalls.
Expand Down

0 comments on commit ae79b24

Please sign in to comment.