in('Feature', 'Unit', 'UseCase'); /* |-------------------------------------------------------------------------- | Database Refresh |-------------------------------------------------------------------------- | | Apply RefreshDatabase to Feature tests that need a clean database state. | Unit tests typically don't require database access. | */ uses(RefreshDatabase::class)->in('Feature'); /* |-------------------------------------------------------------------------- | Helper Functions |-------------------------------------------------------------------------- | | Custom helper functions for agent-related tests. | */ /** * Create a workspace for testing. */ function createWorkspace(array $attributes = []): Workspace { return Workspace::factory()->create($attributes); } /** * Create an API key for testing. */ function createApiKey( Workspace|int|null $workspace = null, string $name = 'Test Key', array $permissions = [], int $rateLimit = 100 ): AgentApiKey { $workspace ??= createWorkspace(); return AgentApiKey::generate($workspace, $name, $permissions, $rateLimit); }