Skip to content

Commit

Permalink
Fix indent of methods
Browse files Browse the repository at this point in the history
  • Loading branch information
keradus committed Jul 4, 2017
1 parent 5deae0d commit c8fb4e7
Showing 1 changed file with 21 additions and 21 deletions.
42 changes: 21 additions & 21 deletions Tests/Functional/SecurityRoutingIntegrationTest.php
Expand Up @@ -78,27 +78,27 @@ public function testSecurityConfigurationForMultipleIPAddresses($config)
$this->assertRestricted($barredClient, '/secured-by-two-ips');
}

/**
* @dataProvider getConfigs
*/
public function testSecurityConfigurationForExpression($config)
{
$allowedClient = $this->createClient(array('test_case' => 'StandardFormLogin', 'root_config' => $config), array('HTTP_USER_AGENT' => 'Firefox 1.0'));
$this->assertAllowed($allowedClient, '/protected-via-expression');

$barredClient = $this->createClient(array('test_case' => 'StandardFormLogin', 'root_config' => $config), array());
$this->assertRestricted($barredClient, '/protected-via-expression');

$allowedClient = $this->createClient(array('test_case' => 'StandardFormLogin', 'root_config' => $config), array());

$allowedClient->request('GET', '/protected-via-expression');
$form = $allowedClient->followRedirect()->selectButton('login')->form();
$form['_username'] = 'johannes';
$form['_password'] = 'test';
$allowedClient->submit($form);
$this->assertRedirect($allowedClient->getResponse(), '/protected-via-expression');
$this->assertAllowed($allowedClient, '/protected-via-expression');
}
/**
* @dataProvider getConfigs
*/
public function testSecurityConfigurationForExpression($config)
{
$allowedClient = $this->createClient(array('test_case' => 'StandardFormLogin', 'root_config' => $config), array('HTTP_USER_AGENT' => 'Firefox 1.0'));
$this->assertAllowed($allowedClient, '/protected-via-expression');

$barredClient = $this->createClient(array('test_case' => 'StandardFormLogin', 'root_config' => $config), array());
$this->assertRestricted($barredClient, '/protected-via-expression');

$allowedClient = $this->createClient(array('test_case' => 'StandardFormLogin', 'root_config' => $config), array());

$allowedClient->request('GET', '/protected-via-expression');
$form = $allowedClient->followRedirect()->selectButton('login')->form();
$form['_username'] = 'johannes';
$form['_password'] = 'test';
$allowedClient->submit($form);
$this->assertRedirect($allowedClient->getResponse(), '/protected-via-expression');
$this->assertAllowed($allowedClient, '/protected-via-expression');
}

private function assertAllowed($client, $path)
{
Expand Down

0 comments on commit c8fb4e7

Please sign in to comment.