format backend code
This commit is contained in:
parent
9577367622
commit
67dd376a2f
40 changed files with 146 additions and 71 deletions
|
|
@ -31,7 +31,7 @@ class AuthMiddlewareTest extends TestCase
|
|||
'2026-04-29T12:00:00',
|
||||
new DateTimeZone('UTC')
|
||||
);
|
||||
$this->sessionRepo = new FakeSessionRepository;
|
||||
$this->sessionRepo = new FakeSessionRepository();
|
||||
$this->clock = new FakeClock($this->now);
|
||||
$this->middleware = new AuthMiddleware(
|
||||
$this->sessionRepo,
|
||||
|
|
@ -58,7 +58,7 @@ class AuthMiddlewareTest extends TestCase
|
|||
};
|
||||
}
|
||||
|
||||
public function test_missing_cookie_returns_unauthorized_json(): void
|
||||
public function testMissingCookieReturnsUnauthorizedJson(): void
|
||||
{
|
||||
$captured = null;
|
||||
$response = $this->middleware->handle(
|
||||
|
|
@ -74,7 +74,7 @@ class AuthMiddlewareTest extends TestCase
|
|||
$this->assertNull($captured);
|
||||
}
|
||||
|
||||
public function test_unknown_token_returns_unauthorized(): void
|
||||
public function testUnknownTokenReturnsUnauthorized(): void
|
||||
{
|
||||
$captured = null;
|
||||
$response = $this->middleware->handle(
|
||||
|
|
@ -86,7 +86,7 @@ class AuthMiddlewareTest extends TestCase
|
|||
$this->assertNull($captured);
|
||||
}
|
||||
|
||||
public function test_expired_session_returns_unauthorized_and_is_deleted(): void
|
||||
public function testExpiredSessionReturnsUnauthorizedAndIsDeleted(): void
|
||||
{
|
||||
$user = new User(
|
||||
id: 7,
|
||||
|
|
@ -113,7 +113,7 @@ class AuthMiddlewareTest extends TestCase
|
|||
);
|
||||
}
|
||||
|
||||
public function test_valid_session_attaches_user_and_calls_next(): void
|
||||
public function testValidSessionAttachesUserAndCallsNext(): void
|
||||
{
|
||||
$user = new User(
|
||||
id: 7,
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue