forked from core/php-mcp
Add extensive Pest tests for the MCP quota system covering: - Usage recording and tracking (tool calls, tokens) - Quota enforcement per tier (free, starter, pro, business, enterprise) - Token quota enforcement independently of tool calls - Detailed quota check responses with reasons - Remaining quota calculation - Quota reset and monthly period management - Usage history retrieval - Quota HTTP headers (X-MCP-Quota-*) - Quota limits retrieval and caching - CheckMcpQuota middleware (429 responses, headers injection) - Workspace-scoped quotas (isolation, independent limits) - McpUsageQuota model (scopes, accessors, static methods) - Edge cases (concurrent requests, cache invalidation, month boundaries) - Cache management (performance caching, invalidation) Replaces basic test coverage with ~100 test cases for thorough validation. Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com> |
||
|---|---|---|
| .. | ||
| Mcp | ||
| Website/Mcp | ||