Skip to content

Commit 8b123e7

Browse files
committed
Remove unused local variables in tests
1 parent fb11079 commit 8b123e7

6 files changed

+7
-11
lines changed

Tests/Firewall/LogoutListenerTest.php

+3-3
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ class LogoutListenerTest extends TestCase
2020
{
2121
public function testHandleUnmatchedPath()
2222
{
23-
list($listener, $tokenStorage, $httpUtils, $options) = $this->getListener();
23+
list($listener, , $httpUtils, $options) = $this->getListener();
2424

2525
list($event, $request) = $this->getGetResponseEvent();
2626

@@ -130,7 +130,7 @@ public function testSuccessHandlerReturnsNonResponse()
130130
$this->expectException('RuntimeException');
131131
$successHandler = $this->getSuccessHandler();
132132

133-
list($listener, $tokenStorage, $httpUtils, $options) = $this->getListener($successHandler);
133+
list($listener, , $httpUtils, $options) = $this->getListener($successHandler);
134134

135135
list($event, $request) = $this->getGetResponseEvent();
136136

@@ -152,7 +152,7 @@ public function testCsrfValidationFails()
152152
$this->expectException('Symfony\Component\Security\Core\Exception\LogoutException');
153153
$tokenManager = $this->getTokenManager();
154154

155-
list($listener, $tokenStorage, $httpUtils, $options) = $this->getListener(null, $tokenManager);
155+
list($listener, , $httpUtils, $options) = $this->getListener(null, $tokenManager);
156156

157157
list($event, $request) = $this->getGetResponseEvent();
158158

Tests/Firewall/RememberMeListenerTest.php

+2-2
Original file line numberDiff line numberDiff line change
@@ -221,7 +221,7 @@ public function testOnCoreSecurity()
221221

222222
public function testSessionStrategy()
223223
{
224-
list($listener, $tokenStorage, $service, $manager, , $dispatcher, $sessionStrategy) = $this->getListener(false, true, true);
224+
list($listener, $tokenStorage, $service, $manager, , , $sessionStrategy) = $this->getListener(false, true, true);
225225

226226
$tokenStorage
227227
->expects($this->once())
@@ -286,7 +286,7 @@ public function testSessionStrategy()
286286

287287
public function testSessionIsMigratedByDefault()
288288
{
289-
list($listener, $tokenStorage, $service, $manager, , $dispatcher, $sessionStrategy) = $this->getListener(false, true, false);
289+
list($listener, $tokenStorage, $service, $manager) = $this->getListener(false, true, false);
290290

291291
$tokenStorage
292292
->expects($this->once())

Tests/Firewall/RemoteUserAuthenticationListenerTest.php

+1-1
Original file line numberDiff line numberDiff line change
@@ -60,7 +60,7 @@ public function testGetPreAuthenticatedDataNoUser()
6060
$method = new \ReflectionMethod($listener, 'getPreAuthenticatedData');
6161
$method->setAccessible(true);
6262

63-
$result = $method->invokeArgs($listener, [$request]);
63+
$method->invokeArgs($listener, [$request]);
6464
}
6565

6666
public function testGetPreAuthenticatedDataWithDifferentKeys()

Tests/Firewall/X509AuthenticationListenerTest.php

+1-1
Original file line numberDiff line numberDiff line change
@@ -98,7 +98,7 @@ public function testGetPreAuthenticatedDataNoData()
9898
$method = new \ReflectionMethod($listener, 'getPreAuthenticatedData');
9999
$method->setAccessible(true);
100100

101-
$result = $method->invokeArgs($listener, [$request]);
101+
$method->invokeArgs($listener, [$request]);
102102
}
103103

104104
public function testGetPreAuthenticatedDataWithDifferentKeys()

Tests/FirewallTest.php

-2
Original file line numberDiff line numberDiff line change
@@ -48,8 +48,6 @@ public function testOnKernelRequestRegistersExceptionListener()
4848

4949
public function testOnKernelRequestStopsWhenThereIsAResponse()
5050
{
51-
$response = new Response();
52-
5351
$first = $this->getMockBuilder('Symfony\Component\Security\Http\Firewall\ListenerInterface')->getMock();
5452
$first
5553
->expects($this->once())

Tests/RememberMe/ResponseListenerTest.php

-2
Original file line numberDiff line numberDiff line change
@@ -65,8 +65,6 @@ public function testRememberMeCookieIsNotSendWithResponse()
6565

6666
public function testItSubscribesToTheOnKernelResponseEvent()
6767
{
68-
$listener = new ResponseListener();
69-
7068
$this->assertSame([KernelEvents::RESPONSE => 'onKernelResponse'], ResponseListener::getSubscribedEvents());
7169
}
7270

0 commit comments

Comments
 (0)