|
5 | 5 | namespace MinVWS\OpenIDConnectLaravel\Tests\Feature\Http\Controllers;
|
6 | 6 |
|
7 | 7 | use Illuminate\Http\Client\Request;
|
8 |
| -use Illuminate\Http\Response; |
9 | 8 | use Illuminate\Support\Facades\Config;
|
10 | 9 | use Illuminate\Support\Facades\Http;
|
11 | 10 | use Illuminate\Support\Facades\Session;
|
@@ -159,18 +158,15 @@ public function testStateDoesNotMatch(): void
|
159 | 158 | ->withArgs(function (OpenIDConnectClientException $e) {
|
160 | 159 | return $e->getMessage() === 'Unable to determine state';
|
161 | 160 | })
|
162 |
| - ->once() |
163 |
| - ->andReturn(new Response('', 400)); |
| 161 | + ->once(); |
164 | 162 | $this->app->instance(ExceptionHandlerInterface::class, $mock);
|
165 | 163 |
|
166 | 164 | // Set the current state, which is usually generated and saved in the session before login,
|
167 | 165 | // and sent to the issuer during the login redirect.
|
168 | 166 | Session::put('openid_connect_state', 'some-state');
|
169 | 167 |
|
170 | 168 | // We simulate here that the state does not match with the state in the session.
|
171 |
| - // And that the repsonse of ExceptionHandlerInterface is returned. |
172 |
| - $response = $this->getRoute('oidc.login', ['code' => 'some-code', 'state' => 'a-different-state']); |
173 |
| - $response->assertStatus(400); |
| 169 | + $this->getRoute('oidc.login', ['code' => 'some-code', 'state' => 'a-different-state']); |
174 | 170 | }
|
175 | 171 |
|
176 | 172 | public function testIdTokenSignedWithClientSecret(): void
|
|
0 commit comments