File tree Expand file tree Collapse file tree 1 file changed +26
-0
lines changed
src/Symfony/Bundle/SecurityBundle/Tests/DependencyInjection Expand file tree Collapse file tree 1 file changed +26
-0
lines changed Original file line number Diff line number Diff line change @@ -91,6 +91,32 @@ public function testCsrfAliases()
91
91
$ this ->assertEquals ('a_token_id ' , $ processedConfig ['firewalls ' ]['stub ' ]['logout ' ]['csrf_token_id ' ]);
92
92
}
93
93
94
+ /**
95
+ * @group legacy
96
+ */
97
+ public function testLegacyCsrfAliases ()
98
+ {
99
+ $ config = array (
100
+ 'firewalls ' => array (
101
+ 'stub ' => array (
102
+ 'logout ' => array (
103
+ 'csrf_provider ' => 'a_token_generator ' ,
104
+ 'intention ' => 'a_token_id ' ,
105
+ ),
106
+ ),
107
+ ),
108
+ );
109
+ $ config = array_merge (static ::$ minimalConfig , $ config );
110
+
111
+ $ processor = new Processor ();
112
+ $ configuration = new MainConfiguration (array (), array ());
113
+ $ processedConfig = $ processor ->processConfiguration ($ configuration , array ($ config ));
114
+ $ this ->assertTrue (isset ($ processedConfig ['firewalls ' ]['stub ' ]['logout ' ]['csrf_token_generator ' ]));
115
+ $ this ->assertEquals ('a_token_generator ' , $ processedConfig ['firewalls ' ]['stub ' ]['logout ' ]['csrf_token_generator ' ]);
116
+ $ this ->assertTrue (isset ($ processedConfig ['firewalls ' ]['stub ' ]['logout ' ]['csrf_token_id ' ]));
117
+ $ this ->assertEquals ('a_token_id ' , $ processedConfig ['firewalls ' ]['stub ' ]['logout ' ]['csrf_token_id ' ]);
118
+ }
119
+
94
120
/**
95
121
* @expectedException \InvalidArgumentException
96
122
*/
You can’t perform that action at this time.
0 commit comments