11..index ::
22 single: Tests; Simulating authentication
33
4- How to simulate Authentication with atoken in a Functional Test
4+ How to simulate Authentication with aToken in a Functional Test
55================================================================
66
77Authenticating requests in functional tests might slow down the suite.
@@ -11,9 +11,9 @@ it requires additional requests to fill in and submit the form.
1111One of the solutions is to configure your firewall to use ``http_basic `` in
1212the test environment as explained in
1313:doc: `/cookbook/testing/http_authentication `.
14- Another way would becreating a token yourself andstoring it in a session.
15- While doing this you have to make sure that appropriate cookie is sent
16- with a request.Following example demonstrates this technique::
14+ Another way would beto create a token yourself andstore it in a session.
15+ While doing this, you have to make sure that appropriate cookie is sent
16+ with a request.The following example demonstrates this technique::
1717
1818 // src/Acme/DemoBundle/Tests/Controller/DemoControllerTest.php
1919 namespace Acme\DemoBundle\Tests\Controller;
@@ -57,5 +57,5 @@ with a request. Following example demonstrates this technique::
5757
5858..note ::
5959
60- Technique described in:doc: `/cookbook/testing/http_authentication `.
60+ The technique described in:doc: `/cookbook/testing/http_authentication `.
6161 is cleaner and therefore preferred way.