summaryrefslogtreecommitdiffstats
path: root/Tests/Http
diff options
context:
space:
mode:
Diffstat (limited to 'Tests/Http')
-rw-r--r--Tests/Http/Authentication/DefaultAuthenticationSuccessHandlerTest.php2
-rw-r--r--Tests/Http/EntryPoint/RetryAuthenticationEntryPointTest.php10
-rw-r--r--Tests/Http/Firewall/AbstractPreAuthenticatedListenerTest.php10
-rw-r--r--Tests/Http/Firewall/BasicAuthenticationListenerTest.php6
-rw-r--r--Tests/Http/Firewall/ContextListenerTest.php2
-rw-r--r--Tests/Http/Firewall/DigestDataTest.php50
-rw-r--r--Tests/Http/Firewall/X509AuthenticationListenerTest.php2
-rw-r--r--Tests/Http/FirewallTest.php2
-rw-r--r--Tests/Http/HttpUtilsTest.php2
-rw-r--r--Tests/Http/RememberMe/AbstractRememberMeServicesTest.php2
-rw-r--r--Tests/Http/RememberMe/PersistentTokenBasedRememberMeServicesTest.php3
-rw-r--r--Tests/Http/RememberMe/ResponseListenerTest.php2
12 files changed, 47 insertions, 46 deletions
diff --git a/Tests/Http/Authentication/DefaultAuthenticationSuccessHandlerTest.php b/Tests/Http/Authentication/DefaultAuthenticationSuccessHandlerTest.php
index e6bc6ca..aa5902b 100644
--- a/Tests/Http/Authentication/DefaultAuthenticationSuccessHandlerTest.php
+++ b/Tests/Http/Authentication/DefaultAuthenticationSuccessHandlerTest.php
@@ -47,7 +47,7 @@ class DefaultAuthenticationSuccessHandlerTest extends \PHPUnit_Framework_TestCas
{
$options = array(
'always_use_default_target_path' => true,
- 'default_target_path' => '/dashboard'
+ 'default_target_path' => '/dashboard',
);
$response = $this->expectRedirectResponse('/dashboard');
diff --git a/Tests/Http/EntryPoint/RetryAuthenticationEntryPointTest.php b/Tests/Http/EntryPoint/RetryAuthenticationEntryPointTest.php
index 91de1ca..95c73d2 100644
--- a/Tests/Http/EntryPoint/RetryAuthenticationEntryPointTest.php
+++ b/Tests/Http/EntryPoint/RetryAuthenticationEntryPointTest.php
@@ -46,26 +46,26 @@ class RetryAuthenticationEntryPointTest extends \PHPUnit_Framework_TestCase
80,
443,
Request::create('http://localhost/foo/bar?baz=bat'),
- 'https://localhost/foo/bar?baz=bat'
+ 'https://localhost/foo/bar?baz=bat',
),
array(
80,
443,
Request::create('https://localhost/foo/bar?baz=bat'),
- 'http://localhost/foo/bar?baz=bat'
+ 'http://localhost/foo/bar?baz=bat',
),
array(
80,
123,
Request::create('http://localhost/foo/bar?baz=bat'),
- 'https://localhost:123/foo/bar?baz=bat'
+ 'https://localhost:123/foo/bar?baz=bat',
),
array(
8080,
443,
Request::create('https://localhost/foo/bar?baz=bat'),
- 'http://localhost:8080/foo/bar?baz=bat'
- )
+ 'http://localhost:8080/foo/bar?baz=bat',
+ ),
);
}
}
diff --git a/Tests/Http/Firewall/AbstractPreAuthenticatedListenerTest.php b/Tests/Http/Firewall/AbstractPreAuthenticatedListenerTest.php
index 76721ec..34263bc 100644
--- a/Tests/Http/Firewall/AbstractPreAuthenticatedListenerTest.php
+++ b/Tests/Http/Firewall/AbstractPreAuthenticatedListenerTest.php
@@ -64,7 +64,7 @@ class AbstractPreAuthenticatedListenerTest extends \PHPUnit_Framework_TestCase
$listener = $this->getMockForAbstractClass('Symfony\Component\Security\Http\Firewall\AbstractPreAuthenticatedListener', array(
$context,
$authenticationManager,
- 'TheProviderKey'
+ 'TheProviderKey',
));
$listener
->expects($this->once())
@@ -110,7 +110,7 @@ class AbstractPreAuthenticatedListenerTest extends \PHPUnit_Framework_TestCase
$listener = $this->getMockForAbstractClass('Symfony\Component\Security\Http\Firewall\AbstractPreAuthenticatedListener', array(
$context,
$authenticationManager,
- 'TheProviderKey'
+ 'TheProviderKey',
));
$listener
->expects($this->once())
@@ -158,7 +158,7 @@ class AbstractPreAuthenticatedListenerTest extends \PHPUnit_Framework_TestCase
$listener = $this->getMockForAbstractClass('Symfony\Component\Security\Http\Firewall\AbstractPreAuthenticatedListener', array(
$context,
$authenticationManager,
- 'TheProviderKey'
+ 'TheProviderKey',
));
$listener
->expects($this->once())
@@ -199,7 +199,7 @@ class AbstractPreAuthenticatedListenerTest extends \PHPUnit_Framework_TestCase
$listener = $this->getMockForAbstractClass('Symfony\Component\Security\Http\Firewall\AbstractPreAuthenticatedListener', array(
$context,
$authenticationManager,
- 'TheProviderKey'
+ 'TheProviderKey',
));
$listener
->expects($this->once())
@@ -248,7 +248,7 @@ class AbstractPreAuthenticatedListenerTest extends \PHPUnit_Framework_TestCase
$listener = $this->getMockForAbstractClass('Symfony\Component\Security\Http\Firewall\AbstractPreAuthenticatedListener', array(
$context,
$authenticationManager,
- 'TheProviderKey'
+ 'TheProviderKey',
));
$listener
->expects($this->once())
diff --git a/Tests/Http/Firewall/BasicAuthenticationListenerTest.php b/Tests/Http/Firewall/BasicAuthenticationListenerTest.php
index 7616149..b345178 100644
--- a/Tests/Http/Firewall/BasicAuthenticationListenerTest.php
+++ b/Tests/Http/Firewall/BasicAuthenticationListenerTest.php
@@ -39,7 +39,7 @@ class BasicAuthenticationListenerTest extends \PHPUnit_Framework_TestCase
{
$request = new Request(array(), array(), array(), array(), array(), array(
'PHP_AUTH_USER' => 'TheUsername',
- 'PHP_AUTH_PW' => 'ThePassword'
+ 'PHP_AUTH_PW' => 'ThePassword',
));
$token = $this->getMock('Symfony\Component\Security\Core\Authentication\Token\TokenInterface');
@@ -85,7 +85,7 @@ class BasicAuthenticationListenerTest extends \PHPUnit_Framework_TestCase
{
$request = new Request(array(), array(), array(), array(), array(), array(
'PHP_AUTH_USER' => 'TheUsername',
- 'PHP_AUTH_PW' => 'ThePassword'
+ 'PHP_AUTH_PW' => 'ThePassword',
));
$token = $this->getMock('Symfony\Component\Security\Core\Authentication\Token\TokenInterface');
@@ -214,7 +214,7 @@ class BasicAuthenticationListenerTest extends \PHPUnit_Framework_TestCase
{
$request = new Request(array(), array(), array(), array(), array(), array(
'PHP_AUTH_USER' => 'TheUsername',
- 'PHP_AUTH_PW' => 'ThePassword'
+ 'PHP_AUTH_PW' => 'ThePassword',
));
$token = new PreAuthenticatedToken('TheUser', 'TheCredentials', 'TheProviderKey', array('ROLE_FOO'));
diff --git a/Tests/Http/Firewall/ContextListenerTest.php b/Tests/Http/Firewall/ContextListenerTest.php
index 336c333..1429f26 100644
--- a/Tests/Http/Firewall/ContextListenerTest.php
+++ b/Tests/Http/Firewall/ContextListenerTest.php
@@ -186,7 +186,7 @@ class ContextListenerTest extends \PHPUnit_Framework_TestCase
return array(
array(serialize(new \__PHP_Incomplete_Class())),
array(serialize(null)),
- array(null)
+ array(null),
);
}
diff --git a/Tests/Http/Firewall/DigestDataTest.php b/Tests/Http/Firewall/DigestDataTest.php
index 8b63d9c..e5be6f8 100644
--- a/Tests/Http/Firewall/DigestDataTest.php
+++ b/Tests/Http/Firewall/DigestDataTest.php
@@ -18,9 +18,9 @@ class DigestDataTest extends \PHPUnit_Framework_TestCase
public function testGetResponse()
{
$digestAuth = new DigestData(
- 'username="user", realm="Welcome, robot!", ' .
- 'nonce="MTM0NzMyMTgyMy42NzkzOmRlZjM4NmIzOGNjMjE0OWJiNDU0MDAxNzJmYmM1MmZl", ' .
- 'uri="/path/info?p1=5&p2=5", cnonce="MDIwODkz", nc=00000001, qop="auth", ' .
+ 'username="user", realm="Welcome, robot!", '.
+ 'nonce="MTM0NzMyMTgyMy42NzkzOmRlZjM4NmIzOGNjMjE0OWJiNDU0MDAxNzJmYmM1MmZl", '.
+ 'uri="/path/info?p1=5&p2=5", cnonce="MDIwODkz", nc=00000001, qop="auth", '.
'response="b52938fc9e6d7c01be7702ece9031b42"'
);
@@ -30,9 +30,9 @@ class DigestDataTest extends \PHPUnit_Framework_TestCase
public function testGetUsername()
{
$digestAuth = new DigestData(
- 'username="user", realm="Welcome, robot!", ' .
- 'nonce="MTM0NzMyMTgyMy42NzkzOmRlZjM4NmIzOGNjMjE0OWJiNDU0MDAxNzJmYmM1MmZl", ' .
- 'uri="/path/info?p1=5&p2=5", cnonce="MDIwODkz", nc=00000001, qop="auth", ' .
+ 'username="user", realm="Welcome, robot!", '.
+ 'nonce="MTM0NzMyMTgyMy42NzkzOmRlZjM4NmIzOGNjMjE0OWJiNDU0MDAxNzJmYmM1MmZl", '.
+ 'uri="/path/info?p1=5&p2=5", cnonce="MDIwODkz", nc=00000001, qop="auth", '.
'response="b52938fc9e6d7c01be7702ece9031b42"'
);
@@ -42,9 +42,9 @@ class DigestDataTest extends \PHPUnit_Framework_TestCase
public function testGetUsernameWithQuote()
{
$digestAuth = new DigestData(
- 'username="\"user\"", realm="Welcome, robot!", ' .
- 'nonce="MTM0NzMyMTgyMy42NzkzOmRlZjM4NmIzOGNjMjE0OWJiNDU0MDAxNzJmYmM1MmZl", ' .
- 'uri="/path/info?p1=5&p2=5", cnonce="MDIwODkz", nc=00000001, qop="auth", ' .
+ 'username="\"user\"", realm="Welcome, robot!", '.
+ 'nonce="MTM0NzMyMTgyMy42NzkzOmRlZjM4NmIzOGNjMjE0OWJiNDU0MDAxNzJmYmM1MmZl", '.
+ 'uri="/path/info?p1=5&p2=5", cnonce="MDIwODkz", nc=00000001, qop="auth", '.
'response="b52938fc9e6d7c01be7702ece9031b42"'
);
@@ -54,9 +54,9 @@ class DigestDataTest extends \PHPUnit_Framework_TestCase
public function testGetUsernameWithQuoteAndEscape()
{
$digestAuth = new DigestData(
- 'username="\"u\\\\\"ser\"", realm="Welcome, robot!", ' .
- 'nonce="MTM0NzMyMTgyMy42NzkzOmRlZjM4NmIzOGNjMjE0OWJiNDU0MDAxNzJmYmM1MmZl", ' .
- 'uri="/path/info?p1=5&p2=5", cnonce="MDIwODkz", nc=00000001, qop="auth", ' .
+ 'username="\"u\\\\\"ser\"", realm="Welcome, robot!", '.
+ 'nonce="MTM0NzMyMTgyMy42NzkzOmRlZjM4NmIzOGNjMjE0OWJiNDU0MDAxNzJmYmM1MmZl", '.
+ 'uri="/path/info?p1=5&p2=5", cnonce="MDIwODkz", nc=00000001, qop="auth", '.
'response="b52938fc9e6d7c01be7702ece9031b42"'
);
@@ -66,9 +66,9 @@ class DigestDataTest extends \PHPUnit_Framework_TestCase
public function testGetUsernameWithSingleQuote()
{
$digestAuth = new DigestData(
- 'username="\"u\'ser\"", realm="Welcome, robot!", ' .
- 'nonce="MTM0NzMyMTgyMy42NzkzOmRlZjM4NmIzOGNjMjE0OWJiNDU0MDAxNzJmYmM1MmZl", ' .
- 'uri="/path/info?p1=5&p2=5", cnonce="MDIwODkz", nc=00000001, qop="auth", ' .
+ 'username="\"u\'ser\"", realm="Welcome, robot!", '.
+ 'nonce="MTM0NzMyMTgyMy42NzkzOmRlZjM4NmIzOGNjMjE0OWJiNDU0MDAxNzJmYmM1MmZl", '.
+ 'uri="/path/info?p1=5&p2=5", cnonce="MDIwODkz", nc=00000001, qop="auth", '.
'response="b52938fc9e6d7c01be7702ece9031b42"'
);
@@ -78,9 +78,9 @@ class DigestDataTest extends \PHPUnit_Framework_TestCase
public function testGetUsernameWithSingleQuoteAndEscape()
{
$digestAuth = new DigestData(
- 'username="\"u\\\'ser\"", realm="Welcome, robot!", ' .
- 'nonce="MTM0NzMyMTgyMy42NzkzOmRlZjM4NmIzOGNjMjE0OWJiNDU0MDAxNzJmYmM1MmZl", ' .
- 'uri="/path/info?p1=5&p2=5", cnonce="MDIwODkz", nc=00000001, qop="auth", ' .
+ 'username="\"u\\\'ser\"", realm="Welcome, robot!", '.
+ 'nonce="MTM0NzMyMTgyMy42NzkzOmRlZjM4NmIzOGNjMjE0OWJiNDU0MDAxNzJmYmM1MmZl", '.
+ 'uri="/path/info?p1=5&p2=5", cnonce="MDIwODkz", nc=00000001, qop="auth", '.
'response="b52938fc9e6d7c01be7702ece9031b42"'
);
@@ -90,9 +90,9 @@ class DigestDataTest extends \PHPUnit_Framework_TestCase
public function testGetUsernameWithEscape()
{
$digestAuth = new DigestData(
- 'username="\"u\\ser\"", realm="Welcome, robot!", ' .
- 'nonce="MTM0NzMyMTgyMy42NzkzOmRlZjM4NmIzOGNjMjE0OWJiNDU0MDAxNzJmYmM1MmZl", ' .
- 'uri="/path/info?p1=5&p2=5", cnonce="MDIwODkz", nc=00000001, qop="auth", ' .
+ 'username="\"u\\ser\"", realm="Welcome, robot!", '.
+ 'nonce="MTM0NzMyMTgyMy42NzkzOmRlZjM4NmIzOGNjMjE0OWJiNDU0MDAxNzJmYmM1MmZl", '.
+ 'uri="/path/info?p1=5&p2=5", cnonce="MDIwODkz", nc=00000001, qop="auth", '.
'response="b52938fc9e6d7c01be7702ece9031b42"'
);
@@ -106,8 +106,8 @@ class DigestDataTest extends \PHPUnit_Framework_TestCase
$nonce = base64_encode($time.':'.md5($time.':'.$key));
$digestAuth = new DigestData(
- 'username="user", realm="Welcome, robot!", nonce="'.$nonce.'", ' .
- 'uri="/path/info?p1=5&p2=5", cnonce="MDIwODkz", nc=00000001, qop="auth", ' .
+ 'username="user", realm="Welcome, robot!", nonce="'.$nonce.'", '.
+ 'uri="/path/info?p1=5&p2=5", cnonce="MDIwODkz", nc=00000001, qop="auth", '.
'response="b52938fc9e6d7c01be7702ece9031b42"'
);
@@ -146,8 +146,8 @@ class DigestDataTest extends \PHPUnit_Framework_TestCase
$nonce = base64_encode($time.':'.md5($time.':'.$key));
$digestAuth = new DigestData(
- 'username="user", realm="Welcome, robot!", nonce="'.$nonce.'", ' .
- 'uri="/path/info?p1=5&p2=5", cnonce="MDIwODkz", nc=00000001, qop="auth", ' .
+ 'username="user", realm="Welcome, robot!", nonce="'.$nonce.'", '.
+ 'uri="/path/info?p1=5&p2=5", cnonce="MDIwODkz", nc=00000001, qop="auth", '.
'response="b52938fc9e6d7c01be7702ece9031b42"'
);
diff --git a/Tests/Http/Firewall/X509AuthenticationListenerTest.php b/Tests/Http/Firewall/X509AuthenticationListenerTest.php
index 291f919..1ba7311 100644
--- a/Tests/Http/Firewall/X509AuthenticationListenerTest.php
+++ b/Tests/Http/Firewall/X509AuthenticationListenerTest.php
@@ -113,7 +113,7 @@ class X509AuthenticationListenerTest extends \PHPUnit_Framework_TestCase
$request = new Request(array(), array(), array(), array(), array(), array(
'TheUserKey' => 'TheUser',
- 'TheCredentialsKey' => 'TheCredentials'
+ 'TheCredentialsKey' => 'TheCredentials',
));
$context = $this->getMock('Symfony\Component\Security\Core\SecurityContextInterface');
diff --git a/Tests/Http/FirewallTest.php b/Tests/Http/FirewallTest.php
index 0c1d82c..8932b10 100644
--- a/Tests/Http/FirewallTest.php
+++ b/Tests/Http/FirewallTest.php
@@ -88,7 +88,7 @@ class FirewallTest extends \PHPUnit_Framework_TestCase
array(
$this->getMock('Symfony\Component\HttpKernel\HttpKernelInterface'),
$this->getMock('Symfony\Component\HttpFoundation\Request', array(), array(), '', false, false),
- HttpKernelInterface::MASTER_REQUEST
+ HttpKernelInterface::MASTER_REQUEST,
)
);
$event
diff --git a/Tests/Http/HttpUtilsTest.php b/Tests/Http/HttpUtilsTest.php
index db1aa4b..2e281fd 100644
--- a/Tests/Http/HttpUtilsTest.php
+++ b/Tests/Http/HttpUtilsTest.php
@@ -139,7 +139,7 @@ class HttpUtilsTest extends \PHPUnit_Framework_TestCase
return array(
array(SecurityContextInterface::AUTHENTICATION_ERROR),
array(SecurityContextInterface::ACCESS_DENIED_ERROR),
- array(SecurityContextInterface::LAST_USERNAME)
+ array(SecurityContextInterface::LAST_USERNAME),
);
}
diff --git a/Tests/Http/RememberMe/AbstractRememberMeServicesTest.php b/Tests/Http/RememberMe/AbstractRememberMeServicesTest.php
index 02ca8d2..67b415d 100644
--- a/Tests/Http/RememberMe/AbstractRememberMeServicesTest.php
+++ b/Tests/Http/RememberMe/AbstractRememberMeServicesTest.php
@@ -250,7 +250,7 @@ class AbstractRememberMeServicesTest extends \PHPUnit_Framework_TestCase
}
return $this->getMockForAbstractClass('Symfony\Component\Security\Http\RememberMe\AbstractRememberMeServices', array(
- array($userProvider), 'fookey', 'fookey', $options, $logger
+ array($userProvider), 'fookey', 'fookey', $options, $logger,
));
}
diff --git a/Tests/Http/RememberMe/PersistentTokenBasedRememberMeServicesTest.php b/Tests/Http/RememberMe/PersistentTokenBasedRememberMeServicesTest.php
index 26a878f..0d485f3 100644
--- a/Tests/Http/RememberMe/PersistentTokenBasedRememberMeServicesTest.php
+++ b/Tests/Http/RememberMe/PersistentTokenBasedRememberMeServicesTest.php
@@ -124,7 +124,8 @@ class PersistentTokenBasedRememberMeServicesTest extends \PHPUnit_Framework_Test
try {
$service->autoLogin($request);
$this->fail('Expected CookieTheftException was not thrown.');
- } catch (CookieTheftException $theft) { }
+ } catch (CookieTheftException $theft) {
+ }
$this->assertTrue($request->attributes->has(RememberMeServicesInterface::COOKIE_ATTR_NAME));
}
diff --git a/Tests/Http/RememberMe/ResponseListenerTest.php b/Tests/Http/RememberMe/ResponseListenerTest.php
index 8b4667d..59e5fe2 100644
--- a/Tests/Http/RememberMe/ResponseListenerTest.php
+++ b/Tests/Http/RememberMe/ResponseListenerTest.php
@@ -31,7 +31,7 @@ class ResponseListenerTest extends \PHPUnit_Framework_TestCase
$cookie = new Cookie('rememberme');
$request = $this->getRequest(array(
- RememberMeServicesInterface::COOKIE_ATTR_NAME => $cookie
+ RememberMeServicesInterface::COOKIE_ATTR_NAME => $cookie,
));
$response = $this->getResponse();