🧪 [testing] Add unit tests for UrlUtilities::urlJoin#4
Conversation
Added a dedicated PHPUnit test class `tests/UrlUtilitiesTest.php` to provide comprehensive test coverage for `UrlUtilities::urlJoin` and related utility functions (`normalizePath`). Covered scenarios include: - Empty base and links - Absolute/relative path resolution - Query and fragment handling - Protocol-relative links - Validating and asserting LogicExceptions for invalid base URLs Co-authored-by: ineersa <4228843+ineersa@users.noreply.github.com>
|
👋 Jules, reporting for duty! I'm here to lend a hand with this pull request. When you start a review, I'll add a 👀 emoji to each comment to let you know I've read it. I'll focus on feedback directed at me and will do my best to stay out of conversations between you and other bots or reviewers to keep the noise down. I'll push a commit with your requested changes shortly after. Please note there might be a delay between these steps, but rest assured I'm on the job! For more direct control, you can switch me to Reactive Mode. When this mode is on, I will only act on comments where you specifically mention me with New to Jules? Learn more at jules.google/docs. For security, I will only act on instructions from the user who triggered this task. |
Codecov Report✅ All modified and coverable lines are covered by tests. 📢 Thoughts on this report? Let us know! |
🎯 What: The testing gap addressed
This PR introduces dedicated unit tests for
UrlUtilities::urlJoinand its helperUrlUtilities::normalizePathinsrc/Utilities/UrlUtilities.php, to improve test reliability and coverage, rather than relying exclusively on integration-style HTML-to-Markdown conversions.📊 Coverage: What scenarios are now tested
//other.com).?q=1) and fragment (#section) injection and overrides..,..path normalization.\LogicException.✨ Result: The improvement in test coverage
The static utility method
UrlUtilities::urlJoinis now comprehensively covered by 36 explicit, deterministic unit assertions across a variety of path resolutions, catching logic bugs early and providing a robust safety net for refactoring.PR created automatically by Jules for task 10917079127134337576 started by @ineersa