Skip to content

Commit

Permalink
Bugfix | Test BC layer for Symfony Security <5.4
Browse files Browse the repository at this point in the history
  • Loading branch information
stloyd committed Dec 8, 2021
1 parent c2690b5 commit c3a95a2
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 1 deletion.
2 changes: 1 addition & 1 deletion Tests/App/AppKernel.php
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ public function registerContainerConfiguration(LoaderInterface $loader): void

if (Kernel::VERSION_ID >= 60000) {
$loader->load(__DIR__.'/config/security_v6.yaml');
} elseif (Kernel::VERSION_ID >= 50100 && Kernel::VERSION_ID < 60000) {
} elseif (Kernel::VERSION_ID >= 50100 && Kernel::VERSION_ID < 59999) {
if (0 === (int) getenv('USE_NEW_SYMFONY_SECURITY')) {
$loader->load(__DIR__.'/config/security_v5_bc.yaml');
} else {
Expand Down
5 changes: 5 additions & 0 deletions Tests/Security/Http/Authenticator/OAuthAuthenticatorTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@
use Symfony\Component\DependencyInjection\ServiceLocator;
use Symfony\Component\HttpFoundation\Request;
use Symfony\Component\HttpFoundation\Response;
use Symfony\Component\HttpKernel\HttpKernelInterface;
use Symfony\Component\Security\Core\Exception\AuthenticationException;
use Symfony\Component\Security\Core\User\InMemoryUser;
use Symfony\Component\Security\Core\User\User;
Expand Down Expand Up @@ -69,6 +70,7 @@ public function testSupports(): void
['/a', '/b'],
$this->getAuthenticationSuccessHandlerMock(),
$this->getAuthenticationFailureHandlerMock(),
$this->createMock(HttpKernelInterface::class),
[]
);

Expand Down Expand Up @@ -150,6 +152,7 @@ public function testAuthenticate(): void
[],
$this->getAuthenticationSuccessHandlerMock(),
$this->getAuthenticationFailureHandlerMock(),
$this->createMock(HttpKernelInterface::class),
[]
);

Expand Down Expand Up @@ -190,6 +193,7 @@ public function testOnAuthenticationSuccess(): void
[],
$successHandlerMock,
$this->getAuthenticationFailureHandlerMock(),
$this->createMock(HttpKernelInterface::class),
[]
);

Expand All @@ -216,6 +220,7 @@ public function testOnAuthenticationFailure(): void
[],
$this->getAuthenticationSuccessHandlerMock(),
$failureHandlerMock,
$this->createMock(HttpKernelInterface::class),
[]
);

Expand Down

0 comments on commit c3a95a2

Please sign in to comment.