diff options
Diffstat (limited to 'Tests')
22 files changed, 88 insertions, 75 deletions
diff --git a/Tests/Acl/Dbal/AclProviderBenchmarkTest.php b/Tests/Acl/Dbal/AclProviderBenchmarkTest.php index 8f6a30c..e930b19 100644 --- a/Tests/Acl/Dbal/AclProviderBenchmarkTest.php +++ b/Tests/Acl/Dbal/AclProviderBenchmarkTest.php @@ -96,7 +96,7 @@ class AclProviderBenchmarkTest extends \PHPUnit_Framework_TestCase $this->insertEntryStmt = $this->con->prepare('INSERT INTO acl_entries (id, class_id, object_identity_id, field_name, ace_order, security_identity_id, mask, granting, granting_strategy, audit_success, audit_failure) VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?)'); $this->insertOidAncestorStmt = $this->con->prepare('INSERT INTO acl_object_identity_ancestors (object_identity_id, ancestor_id) VALUES (?, ?)'); - for ($i=0; $i<40000; $i++) { + for ($i = 0; $i<40000; $i++) { $this->generateAclHierarchy(); } } @@ -111,7 +111,7 @@ class AclProviderBenchmarkTest extends \PHPUnit_Framework_TestCase protected function generateAclLevel($depth, $parentId, $ancestors) { $level = count($ancestors); - for ($i=0,$t=rand(1, 10); $i<$t; $i++) { + for ($i = 0,$t = rand(1, 10); $i<$t; $i++) { $id = $this->generateAcl($this->chooseClassId(), $parentId, $ancestors); if ($level < $depth) { @@ -165,7 +165,7 @@ class AclProviderBenchmarkTest extends \PHPUnit_Framework_TestCase $this->insertSidStmt->execute(array( $id, $this->getRandomString(rand(5, 30)), - rand(0, 1) + rand(0, 1), )); $id += 1; @@ -182,7 +182,7 @@ class AclProviderBenchmarkTest extends \PHPUnit_Framework_TestCase $sids = array(); $fieldOrder = array(); - for ($i=0; $i<=30; $i++) { + for ($i = 0; $i <= 30; $i++) { $fieldName = rand(0, 1) ? null : $this->getRandomString(rand(10, 20)); do { diff --git a/Tests/Acl/Dbal/MutableAclProviderTest.php b/Tests/Acl/Dbal/MutableAclProviderTest.php index 00a2228..832a896 100644 --- a/Tests/Acl/Dbal/MutableAclProviderTest.php +++ b/Tests/Acl/Dbal/MutableAclProviderTest.php @@ -88,7 +88,8 @@ class MutableAclProviderTest extends \PHPUnit_Framework_TestCase try { $provider->findAcl($oid); $this->fail('ACL has not been properly deleted.'); - } catch (AclNotFoundException $notFound) { } + } catch (AclNotFoundException $notFound) { + } } public function testDeleteAclDeletesChildren() @@ -103,7 +104,8 @@ class MutableAclProviderTest extends \PHPUnit_Framework_TestCase try { $provider->findAcl(new ObjectIdentity(1, 'Foo')); $this->fail('Child-ACLs have not been deleted.'); - } catch (AclNotFoundException $notFound) { } + } catch (AclNotFoundException $notFound) { + } } public function testFindAclsAddsPropertyListener() @@ -148,7 +150,7 @@ class MutableAclProviderTest extends \PHPUnit_Framework_TestCase 'parent' => array( 'object_identifier' => '1', 'class_type' => 'anotherFoo', - ) + ), )); $propertyChanges = $this->getField($provider, 'propertyChanges'); @@ -288,7 +290,8 @@ class MutableAclProviderTest extends \PHPUnit_Framework_TestCase try { $provider->updateAcl($acl1); $this->fail('Provider failed to detect a concurrent modification.'); - } catch (ConcurrentModificationException $ex) { } + } catch (ConcurrentModificationException $ex) { + } } public function testUpdateAcl() diff --git a/Tests/Acl/Domain/AclTest.php b/Tests/Acl/Domain/AclTest.php index 4b67e62..29acc3a 100644 --- a/Tests/Acl/Domain/AclTest.php +++ b/Tests/Acl/Domain/AclTest.php @@ -128,7 +128,7 @@ class AclTest extends \PHPUnit_Framework_TestCase $acl = $this->getAcl(); $listener = $this->getListener(array( - $property, 'aceOrder', $property, 'aceOrder', $property + $property, 'aceOrder', $property, 'aceOrder', $property, )); $acl->addPropertyChangedListener($listener); @@ -358,7 +358,7 @@ class AclTest extends \PHPUnit_Framework_TestCase $acl->{'insert'.$type}('foo', new UserSecurityIdentity('foo', 'Foo'), 1); $listener = $this->getListener(array( - 'mask', 'mask', 'strategy' + 'mask', 'mask', 'strategy', )); $acl->addPropertyChangedListener($listener); diff --git a/Tests/Acl/Domain/AuditLoggerTest.php b/Tests/Acl/Domain/AuditLoggerTest.php index a0f38eb..c8522b4 100644 --- a/Tests/Acl/Domain/AuditLoggerTest.php +++ b/Tests/Acl/Domain/AuditLoggerTest.php @@ -28,7 +28,7 @@ class AuditLoggerTest extends \PHPUnit_Framework_TestCase ->will($this->returnValue($audit)) ; - $ace + $ace ->expects($this->never()) ->method('isAuditFailure') ; diff --git a/Tests/Acl/Domain/PermissionGrantingStrategyTest.php b/Tests/Acl/Domain/PermissionGrantingStrategyTest.php index d200d2b..4698a72 100644 --- a/Tests/Acl/Domain/PermissionGrantingStrategyTest.php +++ b/Tests/Acl/Domain/PermissionGrantingStrategyTest.php @@ -154,7 +154,8 @@ class PermissionGrantingStrategyTest extends \PHPUnit_Framework_TestCase try { $strategy->isGranted($acl, array($requiredMask), array($sid)); $this->fail('The ACE is not supposed to match.'); - } catch (NoAceFoundException $noAce) { } + } catch (NoAceFoundException $noAce) { + } } else { $this->assertTrue($strategy->isGranted($acl, array($requiredMask), array($sid))); } diff --git a/Tests/Acl/Domain/SecurityIdentityRetrievalStrategyTest.php b/Tests/Acl/Domain/SecurityIdentityRetrievalStrategyTest.php index f649653..e5fb4ed 100644 --- a/Tests/Acl/Domain/SecurityIdentityRetrievalStrategyTest.php +++ b/Tests/Acl/Domain/SecurityIdentityRetrievalStrategyTest.php @@ -103,7 +103,7 @@ class SecurityIdentityRetrievalStrategyTest extends \PHPUnit_Framework_TestCase array('guest', array('ROLE_FOO'), 'anonymous', array( new RoleSecurityIdentity('ROLE_FOO'), new RoleSecurityIdentity('IS_AUTHENTICATED_ANONYMOUSLY'), - )) + )), ); } diff --git a/Tests/Core/Authentication/Token/AbstractTokenTest.php b/Tests/Core/Authentication/Token/AbstractTokenTest.php index 5683b78..b8be628 100644 --- a/Tests/Core/Authentication/Token/AbstractTokenTest.php +++ b/Tests/Core/Authentication/Token/AbstractTokenTest.php @@ -52,7 +52,9 @@ class ConcreteToken extends AbstractToken parent::unserialize($parentStr); } - public function getCredentials() {} + public function getCredentials() + { + } } class AbstractTokenTest extends \PHPUnit_Framework_TestCase @@ -227,13 +229,13 @@ class AbstractTokenTest extends \PHPUnit_Framework_TestCase 'foo', $user, ), array( - 'foo', $advancedUser + 'foo', $advancedUser, ), array( - $user, 'foo' + $user, 'foo', ), array( - $advancedUser, 'foo' + $advancedUser, 'foo', ), array( $user, new TestUser('foo'), @@ -254,10 +256,10 @@ class AbstractTokenTest extends \PHPUnit_Framework_TestCase new TestUser('foo'), $advancedUser, ), array( - $user, $advancedUser + $user, $advancedUser, ), array( - $advancedUser, $user + $advancedUser, $user, ), ); } diff --git a/Tests/Core/Authorization/AccessDecisionManagerTest.php b/Tests/Core/Authorization/AccessDecisionManagerTest.php index 0300cb4..37e12b7 100644 --- a/Tests/Core/Authorization/AccessDecisionManagerTest.php +++ b/Tests/Core/Authorization/AccessDecisionManagerTest.php @@ -85,7 +85,7 @@ class AccessDecisionManagerTest extends \PHPUnit_Framework_TestCase array($token, 'consensus', $this->getVoter(VoterInterface::ACCESS_DENIED), false), array($token, 'consensus', $this->getVoter(VoterInterface::ACCESS_GRANTED), true), - + array($token, 'unanimous', $this->getVoterFor2Roles($token, VoterInterface::ACCESS_DENIED, VoterInterface::ACCESS_DENIED), false), array($token, 'unanimous', $this->getVoterFor2Roles($token, VoterInterface::ACCESS_DENIED, VoterInterface::ACCESS_GRANTED), false), array($token, 'unanimous', $this->getVoterFor2Roles($token, VoterInterface::ACCESS_GRANTED, VoterInterface::ACCESS_DENIED), false), @@ -164,7 +164,6 @@ class AccessDecisionManagerTest extends \PHPUnit_Framework_TestCase $voter->expects($this->any()) ->method('vote') ->will($this->returnValue($vote)); - ; return $voter; } @@ -175,7 +174,6 @@ class AccessDecisionManagerTest extends \PHPUnit_Framework_TestCase $voter->expects($this->any()) ->method('supportsClass') ->will($this->returnValue($ret)); - ; return $voter; } @@ -186,7 +184,6 @@ class AccessDecisionManagerTest extends \PHPUnit_Framework_TestCase $voter->expects($this->any()) ->method('supportsAttribute') ->will($this->returnValue($ret)); - ; return $voter; } diff --git a/Tests/Core/Authorization/Voter/RoleVoterTest.php b/Tests/Core/Authorization/Voter/RoleVoterTest.php index 63608eb..8a5cdc5 100644 --- a/Tests/Core/Authorization/Voter/RoleVoterTest.php +++ b/Tests/Core/Authorization/Voter/RoleVoterTest.php @@ -55,7 +55,6 @@ class RoleVoterTest extends \PHPUnit_Framework_TestCase $token->expects($this->once()) ->method('getRoles') ->will($this->returnValue($roles)); - ; return $token; } diff --git a/Tests/Core/Encoder/EncoderFactoryTest.php b/Tests/Core/Encoder/EncoderFactoryTest.php index 2e55a4b..85d4e91 100644 --- a/Tests/Core/Encoder/EncoderFactoryTest.php +++ b/Tests/Core/Encoder/EncoderFactoryTest.php @@ -82,11 +82,21 @@ class EncoderFactoryTest extends \PHPUnit_Framework_TestCase class SomeUser implements UserInterface { - public function getRoles() {} - public function getPassword() {} - public function getSalt() {} - public function getUsername() {} - public function eraseCredentials() {} + public function getRoles() + { + } + public function getPassword() + { + } + public function getSalt() + { + } + public function getUsername() + { + } + public function eraseCredentials() + { + } } class SomeChildUser extends SomeUser 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(); |