test: add unit tests for HasRetry and HasStreamParsing traits #43
No reviewers
Labels
No labels
P1
P2
P3
PHP
agent-ready
bug
clotho
discovery
docs
refactor
review
security
testing
athena
athena-gemini
audit
clotho
clotho-gemini
codex
darbs-claude
security
wiki
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference: core/php-agentic#43
Loading…
Add table
Reference in a new issue
No description provided.
Delete branch "test/service-trait-concerns"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Summary
Closes #12
Adds isolated unit tests for the two service concern traits that previously had no coverage:
tests/Unit/Concerns/HasRetryTest.php— 25 tests forHasRetry:calculateDelayformula (attempt 1/2/3 values, maxDelayMs cap, Retry-After header)tests/Unit/Concerns/HasStreamParsingTest.php— 25 tests forHasStreamParsing:parseSSEStream: basic extraction,[DONE]termination, blank/event/comment line skipping, invalid JSON skipping, null/empty extractor results,endings, chunked reads, remaining buffer after EOFparseJSONStream: single/multiple objects, whitespace-separated, nested objects, escaped quotes, extractor filtering, chunked readsTest plan
HasRetryTesttests pass (no real HTTP calls or sleeps — both are stubbed)HasStreamParsingTesttests pass (in-memory PSR-7 stream mock — no I/O)🤖 Generated with Claude Code