Skip to content

Commit

Permalink
Remove unused local variables in tests
Browse files Browse the repository at this point in the history
  • Loading branch information
fancyweb committed Oct 24, 2019
1 parent fb11079 commit 8b123e7
Show file tree
Hide file tree
Showing 6 changed files with 7 additions and 11 deletions.
6 changes: 3 additions & 3 deletions Tests/Firewall/LogoutListenerTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ class LogoutListenerTest extends TestCase
{
public function testHandleUnmatchedPath()
{
list($listener, $tokenStorage, $httpUtils, $options) = $this->getListener();
list($listener, , $httpUtils, $options) = $this->getListener();

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

Expand Down Expand Up @@ -130,7 +130,7 @@ public function testSuccessHandlerReturnsNonResponse()
$this->expectException('RuntimeException');
$successHandler = $this->getSuccessHandler();

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

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

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

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

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

Expand Down
4 changes: 2 additions & 2 deletions Tests/Firewall/RememberMeListenerTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -221,7 +221,7 @@ public function testOnCoreSecurity()

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

$tokenStorage
->expects($this->once())
Expand Down Expand Up @@ -286,7 +286,7 @@ public function testSessionStrategy()

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

$tokenStorage
->expects($this->once())
Expand Down
2 changes: 1 addition & 1 deletion Tests/Firewall/RemoteUserAuthenticationListenerTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,7 @@ public function testGetPreAuthenticatedDataNoUser()
$method = new \ReflectionMethod($listener, 'getPreAuthenticatedData');
$method->setAccessible(true);

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

public function testGetPreAuthenticatedDataWithDifferentKeys()
Expand Down
2 changes: 1 addition & 1 deletion Tests/Firewall/X509AuthenticationListenerTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -98,7 +98,7 @@ public function testGetPreAuthenticatedDataNoData()
$method = new \ReflectionMethod($listener, 'getPreAuthenticatedData');
$method->setAccessible(true);

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

public function testGetPreAuthenticatedDataWithDifferentKeys()
Expand Down
2 changes: 0 additions & 2 deletions Tests/FirewallTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -48,8 +48,6 @@ public function testOnKernelRequestRegistersExceptionListener()

public function testOnKernelRequestStopsWhenThereIsAResponse()
{
$response = new Response();

$first = $this->getMockBuilder('Symfony\Component\Security\Http\Firewall\ListenerInterface')->getMock();
$first
->expects($this->once())
Expand Down
2 changes: 0 additions & 2 deletions Tests/RememberMe/ResponseListenerTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -65,8 +65,6 @@ public function testRememberMeCookieIsNotSendWithResponse()

public function testItSubscribesToTheOnKernelResponseEvent()
{
$listener = new ResponseListener();

$this->assertSame([KernelEvents::RESPONSE => 'onKernelResponse'], ResponseListener::getSubscribedEvents());
}

Expand Down

0 comments on commit 8b123e7

Please sign in to comment.