Icons: Test the registry sanitizer with a data provider - #83024
Conversation
Mirror the tests from WordPress/wordpress-develop#13559: call `sanitize_icon_content` via reflection with a data provider instead of registering icons from both inline content and a file path. Replace the backport changelog entry for #12197 with one for #13559. Co-Authored-By: Claude <noreply@anthropic.com>
|
The following accounts have interacted with this PR and/or linked issues. I will continue to update these lists as activity occurs. You can also manually ask me to refresh this list by adding the If you're merging code through a pull request on GitHub, copy and paste the following into the bottom of the merge commit message. To understand the WordPress project's expectations around crediting contributors, please review the Contributor Attribution page in the Core Handbook. |
mcsf
left a comment
There was a problem hiding this comment.
Approving based on a cursory look at the code
There was a problem hiding this comment.
cf. Suggestions I made on WordPress/wordpress-develop#13559.
…backport Co-Authored-By: Claude <noreply@anthropic.com>
|
Thanks for the review. I've updated this PR accordingly based on the feedback from the core PR. |
🤖 PR meta 🤖⚡ PerformanceShow the resultsClient side metrics exclude the server response time. front-end-block-theme
front-end-classic-theme
media-processing
media-upload
post-editor
site-editor
|
What?
Extracted from #75550.
Improves the unit tests for the icon registry's SVG sanitizer.
Why?
imgelements, all of which need more discussion.rectandcirclein the registry sanitizer #82846) already render every icon in the core icon set correctly, but the unit tests cover only a few cases.How?
ReflectionMethodto assert against the sanitizer method directly.Testing Instructions
All unit tests should pass.
Use of AI Tools
AI assistance: Yes
Tool(s): Claude Code
Model(s): Claude Opus 5
Used for: Porting the tests from the core PR and drafting this description; reviewed by me.
🤖 Generated with Claude Code