|
5 | 5 | namespace phpMyFAQ\Controller\Frontend; |
6 | 6 |
|
7 | 7 | use OpenSSLAsymmetricKey; |
8 | | -use phpMyFAQ\Auth\Oidc\OidcSession; |
9 | 8 | use phpMyFAQ\Functional\ControllerWebTestCase; |
10 | 9 | use PHPUnit\Framework\Attributes\CoversClass; |
11 | 10 | use PHPUnit\Framework\Attributes\UsesClass; |
12 | 11 | use PHPUnit\Framework\Attributes\UsesNamespace; |
13 | 12 | use Symfony\Component\DependencyInjection\ContainerInterface; |
14 | 13 | use Symfony\Component\HttpClient\MockHttpClient; |
15 | 14 | use Symfony\Component\HttpClient\Response\MockResponse; |
16 | | -use Symfony\Component\HttpFoundation\Session\SessionInterface; |
17 | 15 |
|
18 | 16 | #[CoversClass(KeycloakAuthenticationController::class)] |
19 | 17 | #[UsesNamespace('phpMyFAQ')] |
@@ -72,10 +70,8 @@ public function testCallbackCompletesSuccessfulLoginFlowWithMockedProviderRespon |
72 | 70 | $container = self::$kernel?->getContainer(); |
73 | 71 | self::assertInstanceOf(ContainerInterface::class, $container); |
74 | 72 |
|
75 | | - $session = $container->get('session'); |
76 | | - self::assertInstanceOf(SessionInterface::class, $session); |
77 | | - |
78 | | - $oidcSession = new OidcSession($session); |
| 73 | + $oidcSession = $container->get('phpmyfaq.auth.oidc.session'); |
| 74 | + self::assertInstanceOf(\phpMyFAQ\Auth\Oidc\OidcSession::class, $oidcSession); |
79 | 75 | $oidcSession->setAuthorizationState('state-123', 'nonce-456', 'verifier-789'); |
80 | 76 |
|
81 | 77 | $idToken = $this->signToken([ |
@@ -128,10 +124,8 @@ public function testLogoutBuildsProviderRedirectWithSessionIdToken(): void |
128 | 124 | $container = self::$kernel?->getContainer(); |
129 | 125 | self::assertInstanceOf(ContainerInterface::class, $container); |
130 | 126 |
|
131 | | - $session = $container->get('session'); |
132 | | - self::assertInstanceOf(SessionInterface::class, $session); |
133 | | - |
134 | | - $oidcSession = new OidcSession($session); |
| 127 | + $oidcSession = $container->get('phpmyfaq.auth.oidc.session'); |
| 128 | + self::assertInstanceOf(\phpMyFAQ\Auth\Oidc\OidcSession::class, $oidcSession); |
135 | 129 | $oidcSession->setIdToken('session-id-token'); |
136 | 130 |
|
137 | 131 | $httpClient = new MockHttpClient([ |
|
0 commit comments