From 56488edb48fdadbfe5547fe962a86c1c2be2c097 Mon Sep 17 00:00:00 2001 From: Alexander Schwenn Date: Mon, 19 Jun 2017 23:26:05 +0200 Subject: [PATCH 1/2] Clearify setup of basic auth for test environment --- testing/http_authentication.rst | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/testing/http_authentication.rst b/testing/http_authentication.rst index 8272d086d3f..25c517cb1c5 100644 --- a/testing/http_authentication.rst +++ b/testing/http_authentication.rst @@ -53,6 +53,12 @@ firewall, but only in the configuration file used by tests: ), )); +.. caution:: + + It's crucial to use the same firewall name which is used in ``security.yml`` (e.g. ``main`` + instead of ``your_firewall_name``). So you won't define a *new* element (a new firewall) + under ``security.firewalls``, but alter the original firewall configuration. + Tests can now authenticate via HTTP passing the username and password as server variables using the second argument of ``createClient()``:: From 5f7c5f63b76d38ae5d952a391816fff25c2c5d67 Mon Sep 17 00:00:00 2001 From: Javier Eguiluz Date: Tue, 20 Jun 2017 12:21:51 +0200 Subject: [PATCH 2/2] Minor reword --- testing/http_authentication.rst | 15 ++++++--------- 1 file changed, 6 insertions(+), 9 deletions(-) diff --git a/testing/http_authentication.rst b/testing/http_authentication.rst index 25c517cb1c5..8d5d37970cf 100644 --- a/testing/http_authentication.rst +++ b/testing/http_authentication.rst @@ -30,14 +30,16 @@ firewall, but only in the configuration file used by tests: # app/config/config_test.yml security: firewalls: - your_firewall_name: + # replace 'main' by the name of your own firewall + main: http_basic: ~ .. code-block:: xml - + + @@ -47,18 +49,13 @@ firewall, but only in the configuration file used by tests: // app/config/config_test.php $container->loadFromExtension('security', array( 'firewalls' => array( - 'your_firewall_name' => array( + // replace 'main' by the name of your own firewall + 'main' => array( 'http_basic' => array(), ), ), )); -.. caution:: - - It's crucial to use the same firewall name which is used in ``security.yml`` (e.g. ``main`` - instead of ``your_firewall_name``). So you won't define a *new* element (a new firewall) - under ``security.firewalls``, but alter the original firewall configuration. - Tests can now authenticate via HTTP passing the username and password as server variables using the second argument of ``createClient()``::