Merge branch '2.8' into 3.2
* 2.8: Fix indent of methods
This commit is contained in:
commit
f3cba17b29
@ -78,27 +78,27 @@ class SecurityRoutingIntegrationTest extends WebTestCase
|
|||||||
$this->assertRestricted($barredClient, '/secured-by-two-ips');
|
$this->assertRestricted($barredClient, '/secured-by-two-ips');
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @dataProvider getConfigs
|
* @dataProvider getConfigs
|
||||||
*/
|
*/
|
||||||
public function testSecurityConfigurationForExpression($config)
|
public function testSecurityConfigurationForExpression($config)
|
||||||
{
|
{
|
||||||
$allowedClient = $this->createClient(array('test_case' => 'StandardFormLogin', 'root_config' => $config), array('HTTP_USER_AGENT' => 'Firefox 1.0'));
|
$allowedClient = $this->createClient(array('test_case' => 'StandardFormLogin', 'root_config' => $config), array('HTTP_USER_AGENT' => 'Firefox 1.0'));
|
||||||
$this->assertAllowed($allowedClient, '/protected-via-expression');
|
$this->assertAllowed($allowedClient, '/protected-via-expression');
|
||||||
|
|
||||||
$barredClient = $this->createClient(array('test_case' => 'StandardFormLogin', 'root_config' => $config), array());
|
$barredClient = $this->createClient(array('test_case' => 'StandardFormLogin', 'root_config' => $config), array());
|
||||||
$this->assertRestricted($barredClient, '/protected-via-expression');
|
$this->assertRestricted($barredClient, '/protected-via-expression');
|
||||||
|
|
||||||
$allowedClient = $this->createClient(array('test_case' => 'StandardFormLogin', 'root_config' => $config), array());
|
$allowedClient = $this->createClient(array('test_case' => 'StandardFormLogin', 'root_config' => $config), array());
|
||||||
|
|
||||||
$allowedClient->request('GET', '/protected-via-expression');
|
$allowedClient->request('GET', '/protected-via-expression');
|
||||||
$form = $allowedClient->followRedirect()->selectButton('login')->form();
|
$form = $allowedClient->followRedirect()->selectButton('login')->form();
|
||||||
$form['_username'] = 'johannes';
|
$form['_username'] = 'johannes';
|
||||||
$form['_password'] = 'test';
|
$form['_password'] = 'test';
|
||||||
$allowedClient->submit($form);
|
$allowedClient->submit($form);
|
||||||
$this->assertRedirect($allowedClient->getResponse(), '/protected-via-expression');
|
$this->assertRedirect($allowedClient->getResponse(), '/protected-via-expression');
|
||||||
$this->assertAllowed($allowedClient, '/protected-via-expression');
|
$this->assertAllowed($allowedClient, '/protected-via-expression');
|
||||||
}
|
}
|
||||||
|
|
||||||
private function assertAllowed($client, $path)
|
private function assertAllowed($client, $path)
|
||||||
{
|
{
|
||||||
|
Reference in New Issue
Block a user