Skip to content

Commit 3dc8001

Browse files
committed
[Security] [HttpFoundation] Use class const in test
1 parent a752155 commit 3dc8001

File tree

2 files changed

+4
-2
lines changed

2 files changed

+4
-2
lines changed

Tests/Authenticator/FormLoginAuthenticatorTest.php

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,7 @@
1313

1414
use PHPUnit\Framework\TestCase;
1515
use Symfony\Component\HttpFoundation\Request;
16+
use Symfony\Component\HttpFoundation\Session\SessionInterface;
1617
use Symfony\Component\HttpKernel\Exception\BadRequestHttpException;
1718
use Symfony\Component\Security\Core\Exception\BadCredentialsException;
1819
use Symfony\Component\Security\Core\Security;
@@ -165,7 +166,7 @@ private function setUpAuthenticator(array $options = [])
165166

166167
private function createSession()
167168
{
168-
return $this->createMock('Symfony\Component\HttpFoundation\Session\SessionInterface');
169+
return $this->createMock(SessionInterface::class);
169170
}
170171
}
171172

Tests/Firewall/LogoutListenerTest.php

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,7 @@
1919
use Symfony\Component\HttpKernel\Event\RequestEvent;
2020
use Symfony\Component\Security\Http\Event\LogoutEvent;
2121
use Symfony\Component\Security\Http\Firewall\LogoutListener;
22+
use Symfony\Component\Security\Http\Logout\LogoutHandlerInterface;
2223
use Symfony\Component\Security\Http\Logout\LogoutSuccessHandlerInterface;
2324

2425
class LogoutListenerTest extends TestCase
@@ -183,7 +184,7 @@ public function testLegacyLogoutHandlers()
183184
$response = new Response();
184185
$logoutSuccessHandler->expects($this->any())->method('onLogoutSuccess')->willReturn($response);
185186

186-
$handler = $this->createMock('Symfony\Component\Security\Http\Logout\LogoutHandlerInterface');
187+
$handler = $this->createMock(LogoutHandlerInterface::class);
187188
$handler->expects($this->once())->method('logout')->with($request, $response, $token);
188189
$listener->addHandler($handler);
189190

0 commit comments

Comments
 (0)