.. index:: single: Tests; HTTP authentication How to Simulate HTTP Authentication in a Functional Test ======================================================== .. caution:: Starting from Symfony 5.1, a ``loginUser()`` method was introduced to ease testing secured applications. See :ref:`testing_logging_in_users` for more information about this. If you are still using an older version of Symfony, view `previous versions of this article`_ for information on how to simulate HTTP authentication. .. _previous versions of this article: https://symfony.com/doc/5.0/testing/http_authentication.html