Skip to content

Commit ba5ef6d

Browse files
committed
Tweaking the note from #1101 - mostly because we don't want to assume the user is using form login with entities
1 parent 7fa3aef commit ba5ef6d

File tree

1 file changed

+6
-8
lines changed

1 file changed

+6
-8
lines changed

cookbook/testing/http_authentication.rst

Lines changed: 6 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -19,10 +19,11 @@ You can also override it on a per request basis::
1919
'PHP_AUTH_PW' => 'pa$$word',
2020
));
2121

22-
When your application is using a form_login with an entity provider, you can
23-
simplify your tests by allowing your test configuration to make use of HTTP
24-
authentication. This way you can use the above to authenticate and still use
25-
the entity provider::
22+
When your application is using a ``form_login``, you can simplify your tests
23+
by allowing your test configuration to make use of HTTP authentication. This
24+
way you can use the above to authenticate in tests, but still have your users
25+
login via the normal ``form_login``. The trick is to include the ``http_basic``
26+
key in your firewall, along with the ``form_login`` key:
2627

2728
.. configuration-block::
2829

@@ -31,8 +32,5 @@ the entity provider::
3132
# app/config/config_test.yml
3233
security:
3334
firewalls:
34-
secured_area:
35+
your_firewall_name:
3536
http_basic:
36-
37-
You do have to know the password for your users as this stored encrypted in
38-
the database. You can use fixtures to load test users into your database.

0 commit comments

Comments
 (0)