for($this->tenant) ->create([ 'name' => ['de' => 'Token TTL Test', 'en' => 'Token TTL Test'], 'slug' => 'token-ttl-test', ]); $response = $this->authenticatedRequest('POST', "/api/v1/tenant/events/{$event->slug}/join-tokens"); $response->assertCreated(); $expectedExpiry = now()->addDays(7)->toIso8601String(); $this->assertSame($expectedExpiry, $response->json('data.expires_at')); Carbon::setTestNow(); } }