Opened 43 hours ago
Closed 43 hours ago
#66825 closed enhancement (fixed)
Test header video player selection for YouTube and direct video URLs
| Reported by: | lancewillett | Owned by: | lancewillett |
|---|---|---|---|
| Priority: | normal | Milestone: | 7.3 |
| Component: | Themes | Version: | |
| Severity: | normal | Keywords: | has-patch has-unit-tests |
| Cc: | Focuses: |
Description
The custom header player uses the MIME type returned by get_header_video_settings() to choose how to play a video. Cover YouTube and direct video URLs, as well as an unknown extension and an unset URL. Follow-up to #38172.
Patch: https://github.com/WordPress/wordpress-develop/pull/16189
Change History (2)
This ticket was mentioned in PR #16189 on WordPress/wordpress-develop by @rejaulalomkhan.
43 hours ago
#1
Note:
See TracTickets
for help on using tickets.
Description
Adds dedicated unit tests for
get_header_video_settings()insrc/wp-includes/theme.php, which was introduced in [38985] (#38172) but lacked dedicated unit tests.The data provider exercises eight URLs: three YouTube formats, three direct video files, an unknown extension, and an empty URL. Each case checks the MIME type and video URL used by the header player.
Testing Instructions
Run single-site and multisite test suites and coding standards:
---
This Pull Request is for code review only. Please keep all other discussion to the Trac ticket. Do not merge this Pull Request. See GitHub Pull Requests for Code Review in the Core Handbook for more details.
Use of AI Tools
AI assistance: Yes
Tool(s): Google Antigravity
Model(s): Gemini 3.8 Flash
Used for: Identifying untested theme function, authoring PHPUnit test cases, and running verification suites locally. I reviewed every line, ran the tests, and take responsibility for the change.