Skip to content

test/2.1: Add comprehensive streaming tests for audiobook controller#117

Merged
detain merged 1 commit into
masterfrom
fix/2.1-audiobook-streaming
May 23, 2026
Merged

test/2.1: Add comprehensive streaming tests for audiobook controller#117
detain merged 1 commit into
masterfrom
fix/2.1-audiobook-streaming

Conversation

@detain
Copy link
Copy Markdown
Owner

@detain detain commented May 23, 2026

Summary

Adds comprehensive tests to verify the audiobook streaming fix from commit 998c795.

Tests Added

  • Raw binary response — verifies streamAudiobook() returns raw bytes, not base64-encoded data
  • Correct MIME types — verifies audio/mp4 for .m4b and audio/mpeg for .mp3 files
  • Range request support — verifies 206 Partial Content status + Content-Range header
  • Accept-Ranges header — verifies the Accept-Ranges: bytes header is set
  • 416 Range Not Satisfiable — verifies proper error handling for out-of-bounds range requests

Verification

  • All 14 audiobook controller tests pass
  • Full unit suite (2409 tests) passes
  • PHPStan level 9 passes
  • PHPCS (PSR-12) passes

Related

Fixes section 2.1 of the Phlix update tracker.

- Add test for raw binary response (not base64)
- Add test for correct MIME type headers (audio/mp4, audio/mpeg)
- Add test for Range request support (206 status + Content-Range header)
- Add test for Accept-Ranges header
- Add test for 416 status on unsatisfiable range

Verifies the fix from commit 998c795 (streamAudiobook raw bytes + Range support)
@chatgpt-codex-connector
Copy link
Copy Markdown

You have reached your Codex usage limits for code reviews. You can see your limits in the Codex usage dashboard.

@codacy-production
Copy link
Copy Markdown

Up to standards ✅

🟢 Issues 0 issues

Results:
0 new issues

View in Codacy

🟢 Metrics 4 complexity · 0 duplication

Metric Results
Complexity 4
Duplication 0

View in Codacy

NEW Get contextual insights on your PRs based on Codacy's metrics, along with PR and Jira context, without leaving GitHub. Enable AI reviewer
TIP This summary will be updated as you push new changes.

@detain detain merged commit 35d4150 into master May 23, 2026
8 of 14 checks passed
@detain detain deleted the fix/2.1-audiobook-streaming branch May 23, 2026 11:14
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant