Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Commit 380ce60

Browse filesBrowse files
Merge branch '2.8'
* 2.8: test legacy CSRF configuration options
2 parents ba3afdb + 953ed3c commit 380ce60
Copy full SHA for 380ce60

File tree

1 file changed

+26
-0
lines changed
Filter options

1 file changed

+26
-0
lines changed

‎src/Symfony/Bundle/SecurityBundle/Tests/DependencyInjection/MainConfigurationTest.php

Copy file name to clipboardExpand all lines: src/Symfony/Bundle/SecurityBundle/Tests/DependencyInjection/MainConfigurationTest.php
+26Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -91,6 +91,32 @@ public function testCsrfAliases()
9191
$this->assertEquals('a_token_id', $processedConfig['firewalls']['stub']['logout']['csrf_token_id']);
9292
}
9393

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+
94120
/**
95121
* @expectedException \InvalidArgumentException
96122
*/

0 commit comments

Comments
0 (0)
Morty Proxy This is a proxified and sanitized view of the page, visit original site.