From f318f352227b1b4fa7d214202525e4226a518501 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ren=C3=A9=20H?= Date: Sat, 6 Jan 2018 23:01:55 +0100 Subject: [PATCH] Add tip for headers already send error. Change for the problem PHPUnit headers already send. https://github.com/symfony/symfony/issues/25615 --- testing/http_authentication.rst | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/testing/http_authentication.rst b/testing/http_authentication.rst index ff1f0d49a90..e35e1c20a63 100644 --- a/testing/http_authentication.rst +++ b/testing/http_authentication.rst @@ -71,6 +71,20 @@ The username and password can also be passed on a per request basis:: 'PHP_AUTH_PW' => 'pa$$word', )); +.. tip:: + +   In Symfony 3.4 and 4.0 you have to change the session handler for PHPUnit tests otherwise you get an error + ``PHPUnit Test header already send by...``. + + .. code-block:: yaml + + # config/packages/test/framework.yaml + framework: + test: ~ + session: + storage_id: session.storage.mock_file + + Creating the Authentication Token ---------------------------------