php-agentic/tests/Unit
darbs-claude c315fc43c6
Some checks failed
CI / PHP 8.3 (pull_request) Failing after 1m47s
CI / PHP 8.4 (pull_request) Failing after 1m46s
fix: validate API keys on AgenticManager init (#29)
Log a warning for each AI provider registered without an API key so
that misconfiguration is surfaced at boot time (not silently on the
first API call).  Each message names the environment variable to set:

  ANTHROPIC_API_KEY  – Claude
  GOOGLE_AI_API_KEY  – Gemini
  OPENAI_API_KEY     – OpenAI

Providers without a key remain registered but are marked unavailable
via isAvailable(), preserving backward compatibility.

- Add Log::warning() calls in registerProviders() for empty keys
- Extend AgenticManagerTest with a dedicated 'API key validation
  warnings' describe block (7 new test cases)
- Update DX-002 in TODO.md as resolved

Closes #29

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-02-23 11:39:01 +00:00
..
Concerns style: fix pint code style issues 2026-02-23 06:42:24 +00:00
.gitkeep Initial commit 2026-01-26 23:20:30 +00:00
AgentDetectionTest.php test: add AgentDetection service unit tests 2026-02-23 01:40:47 +00:00
AgenticManagerTest.php fix: validate API keys on AgenticManager init (#29) 2026-02-23 11:39:01 +00:00
ClaudeServiceTest.php feat(tests): add AgenticManager tests 2026-01-29 19:23:20 +00:00
GeminiServiceTest.php feat(tests): add AgenticManager tests 2026-01-29 19:23:20 +00:00
OpenAIServiceTest.php feat(tests): add AgenticManager tests 2026-01-29 19:23:20 +00:00
ProcessContentTaskTest.php fix: use closure-based __get for mock property access 2026-02-23 07:02:04 +00:00