File tree Expand file tree Collapse file tree 2 files changed +6
-5
lines changed Expand file tree Collapse file tree 2 files changed +6
-5
lines changed Original file line number Diff line number Diff line change 140
140
* :doc:` /cookbook/testing/index`
141
141
142
142
* :doc:` /cookbook/testing/http_authentication`
143
+ * :doc:` /cookbook/testing/simulating_authentication`
143
144
* :doc:` /cookbook/testing/insulating_clients`
144
145
* :doc:` /cookbook/testing/profiling`
145
146
* :doc:` /cookbook/testing/doctrine`
Original file line number Diff line number Diff line change 1
1
.. index ::
2
2
single: Tests; Simulating authentication
3
3
4
- How to simulate Authentication with a token in a Functional Test
4
+ How to simulate Authentication with a Token in a Functional Test
5
5
================================================================
6
6
7
7
Authenticating requests in functional tests might slow down the suite.
@@ -11,9 +11,9 @@ it requires additional requests to fill in and submit the form.
11
11
One of the solutions is to configure your firewall to use ``http_basic `` in
12
12
the test environment as explained in
13
13
:doc: `/cookbook/testing/http_authentication `.
14
- Another way would be creating a token yourself and storing 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 be to create a token yourself and store 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::
17
17
18
18
// src/Acme/DemoBundle/Tests/Controller/DemoControllerTest.php
19
19
namespace Acme\DemoBundle\Tests\Controller;
@@ -57,5 +57,5 @@ with a request. Following example demonstrates this technique::
57
57
58
58
.. note ::
59
59
60
- Technique described in :doc: `/cookbook/testing/http_authentication `.
60
+ The technique described in :doc: `/cookbook/testing/http_authentication `.
61
61
is cleaner and therefore preferred way.
You can’t perform that action at this time.
0 commit comments