'auth.ladill.com']); $user = User::create([ 'public_id' => 'session-test-001', 'name' => 'Tester', 'email' => 'session-test@example.com', 'password' => bcrypt('password'), ]); Http::fake(); $this->actingAs($user) ->withSession(['platform_session_verified_at' => time()]) ->get(route('qms.dashboard')) ->assertRedirect(); Http::assertNothingSent(); } public function test_pings_auth_when_verification_expired(): void { config(['app.auth_domain' => 'auth.ladill.com']); $user = User::create([ 'public_id' => 'session-test-002', 'name' => 'Tester', 'email' => 'session-test-2@example.com', 'password' => bcrypt('password'), ]); Http::fake([ 'https://auth.ladill.com/sso/ping' => Http::response('', 204), ]); $this->actingAs($user) ->withSession(['platform_session_verified_at' => time() - 120]) ->withHeader('Cookie', 'laravel_session=fake-session-id') ->get(route('qms.dashboard')) ->assertRedirect(); Http::assertSentCount(1); } }