Skip to content

Commit c82c2f1

Browse files
committed
[SecurityBundle] Add test for simple authentication config
1 parent 1b26aac commit c82c2f1

File tree

4 files changed

+22
-0
lines changed

4 files changed

+22
-0
lines changed

src/Symfony/Bundle/SecurityBundle/Tests/DependencyInjection/CompleteConfigurationTest.php

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -101,6 +101,13 @@ public function testFirewalls()
101101
'security.authentication.listener.anonymous.with_user_checker',
102102
'security.access_listener',
103103
),
104+
array(
105+
'security.channel_listener',
106+
'security.context_listener.2',
107+
'security.authentication.listener.simple_form.simple_auth',
108+
'security.authentication.listener.anonymous.simple_auth',
109+
'security.access_listener',
110+
),
104111
), $listeners);
105112
}
106113

src/Symfony/Bundle/SecurityBundle/Tests/DependencyInjection/Fixtures/php/container1.php

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -86,6 +86,11 @@
8686
'anonymous' => true,
8787
'http_basic' => true,
8888
),
89+
'simple_auth' => array(
90+
'provider' => 'default',
91+
'anonymous' => true,
92+
'simple_form' => array('authenticator' => 'simple_authenticator'),
93+
),
8994
),
9095

9196
'access_control' => array(

src/Symfony/Bundle/SecurityBundle/Tests/DependencyInjection/Fixtures/xml/container1.xml

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -71,6 +71,11 @@
7171
<user-checker>app.user_checker</user-checker>
7272
</firewall>
7373

74+
<firewall name="simple_auth" provider="default">
75+
<anonymous />
76+
<simple-form authenticator="simple_authenticator" />
77+
</firewall>
78+
7479
<role id="ROLE_ADMIN">ROLE_USER</role>
7580
<role id="ROLE_SUPER_ADMIN">ROLE_USER,ROLE_ADMIN,ROLE_ALLOWED_TO_SWITCH</role>
7681
<role id="ROLE_REMOTE">ROLE_USER,ROLE_ADMIN</role>

src/Symfony/Bundle/SecurityBundle/Tests/DependencyInjection/Fixtures/yml/container1.yml

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -70,6 +70,11 @@ security:
7070
http_basic: ~
7171
user_checker: app.user_checker
7272

73+
simple_auth:
74+
provider: default
75+
anonymous: ~
76+
simple_form: { authenticator: simple_authenticator }
77+
7378
role_hierarchy:
7479
ROLE_ADMIN: ROLE_USER
7580
ROLE_SUPER_ADMIN: [ROLE_USER, ROLE_ADMIN, ROLE_ALLOWED_TO_SWITCH]

0 commit comments

Comments
 (0)