We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent f225bc4 commit 58affd9Copy full SHA for 58affd9
tests/Security/AuthMiddlewareTest.php
@@ -70,9 +70,11 @@ public function testJWTAuthenticationFailure(): void
70
$request = $this->createPsrRequest(['Authorization' => 'Bearer invalid_token']);
71
$handler = new DummyHandler();
72
73
- $this->expectException(\PivotPHP\Core\Exceptions\HttpException::class);
74
- $this->expectExceptionMessage('Unauthorized');
75
- $middleware->process($request, $handler);
+ try {
+ $middleware->process($request, $handler);
+ } catch (\PivotPHP\Core\Exceptions\HttpException $e) {
76
+ $this->assertEquals('Unauthorized', $e->getMessage());
77
+ }
78
$this->assertFalse($handler->called);
79
}
80
0 commit comments